DeleteFiles icon indicating copy to clipboard operation
DeleteFiles copied to clipboard

DeleteFiles Still Unable to Delete Long Paths

Open derek-groupmail opened this issue 9 years ago • 1 comments

I'm finding that this utility still has an issue with npm long paths. e.g. The following long folder path can't be deleted:-

C:\Users\mcder_000\Dropbox\Temp\001_Week\_err\groupmail-templates\node_modules\gulp-imagemin\node_modules\imagemin\node_modules\imagemin-jpegtran\node_modules\jpegtran-bin\node_modules\logalot\node_modules\squeak\node_modules\lpad-align\node_modules\meow

The above path is 254 chars - I'm not sure if there are other paths nested below that, but that's as deep as I can see, from file explorer (on Windows 10) at any rate. From the face of it, that does appear to be the full path. There are no actual files along this path, only empty folders as presumably DeleteFiles was successful in removing those. File properties at the root '_err' folder show "0 files, 17 folders, 0 bytes".

So, running this command directly in the CMD.exe doesn't appear to remove the empty folders:-

DeleteFiles C:\Users\mcder_000\Dropbox\Temp\001_Week\_err\*.* -r -f

When I run it, it gives the following report:-

West Wind DeleteFiles [Version 1.14]


Failed to delete directory \\?\C:\Users\mcder_000\Dropbox\Temp\001_Week\_err\groupmail-templates\node_modules\gulp-imagemin\node_modules\imagemin\node_modules\imagemin-jpegtran\node_modules\jpegtran-bin\node_modules\logalot\node_modules\squeak\node_modules\lpad-align\node_modules\meow


Summary:
  No files found to delete.

Note that when I run the above command with the -l switch, it suggests that there is indeed 1 folders deleted. So, it would like to delete the folder, it just can't!

Any ideas?

Derek

derek-groupmail avatar Aug 26 '16 09:08 derek-groupmail

Are you sure the files are not open and in use or otherwise inaccessible?

I'm not sure why it wouldn't work since I'm quite certain that other files and folders are getting deleted. Can you try running as Admin to see if that makes a difference?

RickStrahl avatar Aug 28 '16 05:08 RickStrahl