1

I am deleting a folder that contains large amount of files (Milions of files) under Windows Server 2012 and i am using this command for this purpose :

rmdir /s/q foldername

Is there a way i can see the files that are being deleted in the cmd window?

Mehdi Souregi
  • 3,153
  • 5
  • 36
  • 53
  • 2
    It might help if you explain WHY you would want to see this? I can't imagine anyone sitting around watching millions of files being deleted. – AsheraH Dec 14 '16 at 10:47
  • 2
    You should probably look at this http://stackoverflow.com/questions/8397674/windows-batch-file-looping-through-directories-to-process-files. Instead of `rm`ing the whole directory, go through and for each file, `echo` it and then delete it. That's how I would do it. – Shikatsu Kagaminara Dec 14 '16 at 10:47
  • @AsheraH because for some reason there are other programs running in parallele and adding content to my folder, so i wanna have an idea about this process – Mehdi Souregi Dec 14 '16 at 11:00

1 Answers1

1

If you use DEL to delete the files and RMDIR to delete the directories afterwards, you get your desired behaviour:

DEL /Q /S foldername\* && RMDIR /Q /S foldername
zb226
  • 9,586
  • 6
  • 49
  • 79