Skip to content

Instantly share code, notes, and snippets.

@brunodesde1987
Forked from archagon/robocopy-delete
Created February 29, 2020 14:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brunodesde1987/5a84005b66cceb8e84d3128e7f3ba594 to your computer and use it in GitHub Desktop.
Save brunodesde1987/5a84005b66cceb8e84d3128e7f3ba594 to your computer and use it in GitHub Desktop.
Sometimes Windows has trouble deleting directories with very long paths down in the lower depths. Fortunately, robocopy can magically circumvent this! Simply create an empty directory and mirror it into the directory you wish to delete.
robocopy /b /mir "C:\EmptyDir" "C:\DirToEmpty"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment