Wednesday, July 5, 2017

unable to delete file source path too long

When working with a client I was unable to move or delete a file/folder because I got a message from windows saying the source path name was too long.
Here's what I did to fix it:
From the explorer window where you have trouble, click the addressbar so you can type in it, then type cmd and press Enter to start a command prompt at that location, then proceed at step 3. :)
When you are in explorer at the right path, just type in subst j: . in the addressbar (or any drive letter not assigned to a drive) and press enter. A command window will pop up, execute the command and close again, and there you go, a new drive pops up in explorer.
Now you can go into that drive letter you just assigned and delete the file where the name was too long.

1 comment:

  1. nice blog, but I also try using Long path tool program and its also very effective.

    ReplyDelete