0

I have a working directory that is used to unzip logfiles to, analyze them, and then they can be deleted. Either only the files in the folder or the complete folder and then recreating the folder. # of files in the folder can vary between 5k and 36k, average filesize is 6MB

I am currently using robocopy to purge the directory and have seen a couple of suggestions on how to do this in Python (How to delete the contents of a folder?) but was wondering which one would be the faster approach.

Thanks!

zimti79
  • 13
  • 4

1 Answers1

0

Robocopy is optimised pretty well, and is multithreaded by default, so it should win this comfortably. You can even override the number of threads it uses with something like /MT:24. See here for more info.

When I choose Python over robocopy it is because I want more control/logic, certainly not for speed.

womblerone
  • 552
  • 7
  • 18