Skip to content

Instantly share code, notes, and snippets.

@mirjalal
Created March 4, 2017 19:14
Show Gist options
  • Save mirjalal/ac2b86c97d9da7fd806d949d583dd747 to your computer and use it in GitHub Desktop.
Save mirjalal/ac2b86c97d9da7fd806d949d583dd747 to your computer and use it in GitHub Desktop.
How to use Robocopy tool in Windows
Problem:
The source file name(s) are larger than is supported by the file system. Try moving to a location which has a shorter path name, or try renaming to shorter name(s) before attempting this operation.
Solution:
1. Create a new empty folder, e.g. c:\empty
2. Then copy that empty folder onto the folder which contains the long filenames which you're trying to delete, e.g. c:\myannoyingfolder. Do this like so in the command prompt:
robocopy /MIR c:\empty c:\myannoyingfolder
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment