Skip to content

DeleteFiles Still Unable to Delete Long Paths #4

@derek-groupmail

Description

@derek-groupmail

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions