Friday, May 24, 2013

Eliminating Long File Paths from Command Line


I was struggling here trying to delete 2 folders that contained an enormous number of subfolders and I was always getting a "too deep folder" or "file to long" errors.

After some search and testing here's a nice, very nice solution for doing it from command line with Robocopy:


  • Create an empty folder (ex.: D:\Empty)
  • robocopy /purge D:\Empty D:\longfoldername

And it's done! :)