Quantcast
Channel: Windows 7 Miscellaneous forum
Viewing all articles
Browse latest Browse all 11372

The dangers of robocopy and symbolic links

$
0
0

I was backing up a laptop to a USB drive overnight, using robocopy to copy the directory structure of C:\Users on a Win 7 Pro build. The process ran all night. By the next morning, the copy had failed due to insufficient space on the drive. The data being backed up was only 120 GB and the drive was an empty 500 GB. According to the log, the process only made it about 20% of the way before it got caught in an endless loop of copying the C:\Users\<username>\Application Data link. I had forgot to include the /xjd switch in the job file it seems.

Unfortunately, now I am unable to delete the "Application Data" folder as I get a "...filenames are too long for the destination folder..." error. Upon inspection, the folder appears to point to itself, creating a seemingly endless subdirectory tree. I've tried manually deleting parts of the directory structure through cut, paste and delete operations but I gave up after 2 hrs. I then tried writing a batch script using robocopy to mirror an empty folder, hoping that would remove the "Application Data" folder, but that too fails after a few minutes once the directory path gets too long.

I've checked online but haven't been able to find any tool which would allow me to delete the circular link that was created by robocopy. Does anyone have suggestions on how to remove this file structure besides formatting the drive?


Viewing all articles
Browse latest Browse all 11372

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>