Deleting Folders or Files That Have Long Paths

Ever wanted to delete a folder or a file only for Windows to complain that the path is too long? Robocopy to the rescue! Below are the steps:

  1. Create an empty folder (eg. temp_empty) in a directory of your choice.
  2. Open the the command line (search “cmd” for Windows 10 in Start menu)
  3. Type robocopy C:/temp_empty C:/folder_with_long_path_to_delete /purge
    • Do replace the “C:/” portion with the actual path
  4. And done!

I hope this works for you as it did for me. I found out about this here.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s