Deleting files or folders with long path names in Windows
5th September 2015 · Development
If you backup Linux files to Windows 10 (and earlier versions with robocopy) there will be times when Windows allows you to download and extract the tarball… then does not allow you to delete the resulting files due to “too long paths”, etc.
“Normal” Windows tools don’t let you bypass this, but command prompt does.
Launch command prompt and CD to the parent folder of the folder that Windows will not allow you to delete.
Then create a new folder called: “emptyfolder”.
Then run “robocopy emptyfolder originalfolder /PURGE” where “originalfolder” is the name of your undeletable folder.
You will end up with 2 folders with no files or folders under them and Windows will allow you to delete them both.