Tip for deleting files with long paths on Windows

Started by ergophobe, May 24, 2017, 02:33:49 PM

Previous topic - Next topic

ergophobe

Insane, but I can create a file I can't delete on Windows. This is a big problem if you do anything with nodejs modules or others. Ran into this yesterday and came across this tip

https://clintboessen.blogspot.com/2014/05/how-to-delete-files-which-exceed-255.html

Use Window's built-in robocopy to the copy an empty directory over the problem one.

>robocopy C:\something\empty C:\something\long /MIR

Also, one of the comments says you can do this via 7-zip and it works too

Leona

 ::) I had forgotten about that, welcome to windows 10 just as annoying as the schedule function. I can't remember how I did it but I somehow searched for file paths over x amount of characters and then changed them. It came up with a list, it may have been a cmd call.