Deleting Folders or Files That Have Long Paths

Salihan Zaol-kefli
1 min readJan 29, 2017

--

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 Prompt (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 or directory)
  4. And done!

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

Note: Please only use this if you are confident with your ability to use the Command Prompt

--

--

Salihan Zaol-kefli
Salihan Zaol-kefli

Written by Salihan Zaol-kefli

Software Engineer, Amateur Writer, Casual Gamer

Responses (2)