The Core

Why We Are Here => Web Development => Topic started by: ergophobe on May 24, 2017, 02:33:49 PM

Title: Tip for deleting files with long paths on Windows
Post by: ergophobe on May 24, 2017, 02:33:49 PM
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
Title: Re: Tip for deleting files with long paths on Windows
Post by: Leona on May 24, 2017, 05:23:58 PM
 ::) 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.