Home > Active Directory, Consulting > Deleting directory with long names inside

Deleting directory with long names inside

When you want to completely delete a directory and it has file with long names inside it, Robocopy does a VERY good job.  The type of folders in this case could be Favorites with URLs that are really long.  When this happens the folder/file path becomes too long for Windows to delete properly.

Open Cmd.exe prompt as administrator.

Type the following commands:

  1. mkdir “empty_dir”
  2. robocopy “empty_dir” “the_dir_to_delete” /s /mir
  3. rmdir “empty_dir”
  4. rmdir “the_dir_to_delete”

 

 

  1. No comments yet.
  1. No trackbacks yet.

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 )

Connecting to %s

%d bloggers like this: