18

We had a user run a robocopy command to copy some files but unfortunately the user accidentally messed up the syntax.

Something like:

robocopy "\\server1\share\Accounting" \\server1\share\NewAccounting" /E /X /COPYALL /TEE

Which without the proper quote on the destination directory ended up screwing up the rocobopy destination as follows:

Started : Tue May 05 12:30:00 2015

Source : \\server1\share\Accounting

Dest : \\server1\share\NewAccounting \E \X \COPYALL \TEE\

Files : *.*

This ends up creating new folders "E", "X", "COPYALL", "TEE" all without NTFS security.

The folder security tabs show "The requested security information is either unavailable or cannot be displayed." and you cannot delete the folders via Windows Explorer or normal command line.

The server in question happens to be an EMC Celerra CIFS server.

Any ideas how to clean this up and remove the invalid new destinations?

Aaron Hall
  • 296
  • 3
  • 12
TheCleaner
  • 32,352
  • 26
  • 126
  • 188

1 Answers1

27

So for this you can harken back to your DOS days (if you had them) and utilize the 8.3 naming convention, which gets around the invalid NTFS security descriptors that aren't there.

Steps to remove the invalid new destination folders:

  1. Open a command prompt with admin rights to the root folder where these new folders are listed.
  2. Use the command DIR /X to list out the folders in the 8.3 naming convention. Note: you can use something like DIR /X *NewAccounting* or similar if you want to wildcard the command to only show specific directories.
  3. Once you have the list of your invalid directories, shown as something like NewAcc~1 then it is time to remove them.
  4. Use the command rmdir NewAcc~1 /S to remove the directory and all of its subdirectories (and possibly files) that were created accidentally.

Hope that helps someone else.

TheCleaner
  • 32,352
  • 26
  • 126
  • 188