Author Topic: Tip for deleting files with long paths on Windows  (Read 776 times)

ergophobe

  • Inner Core
  • Hero Member
  • *
  • Posts: 3622
    • View Profile
Tip for deleting files with long paths on Windows
« 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

Leona

  • Inner Core
  • Hero Member
  • *
  • Posts: 504
    • View Profile
    • Email
Re: Tip for deleting files with long paths on Windows
« Reply #1 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.