New
#1
Robocopy mass nesting bug
Didn't know where else to put this so I hope this is good.
Twice now I have experienced a issue with robocopy where while copying a user folder it mass nests the Application Data folder within Local. It replicates this to both \User\AppData\Local and \User\Local Settings. Weird thing is Local Settings is just a place holder to point legacy programs to the new location so why robo copy created a folder from this I am not to sure. Both times I have had this happen it has replicated the Application Data folder so many times within itself that it fills the HDD down to the last byte. And since it is nesting it the path is far too long for any standard windows command to do anything with this structure. For example my last instance of it replicated about 15,000 files into over 200,000 from ~9GB to over 80GB and over 30 directories deep. Not sure if there is any end to it or if it does just keep repeating until the drive is full. Some loop issue with the local settings place holder?
Anyway to delete this massively nested directory structure I have found two methods.
1. Boot into Ubuntu (or any distro of your chooseing... I like the Ubuntu live CD) and delete the folder from there. In Ubuntu it moves into the trash so you have to delete it from there as well.
2. Use robocopy again to copy over a nul directory. For instance I created a empty folder called empty on the root of C and then as follows ROBOCOPY C:\EMPTY "X:\USERS\ADMINISTRATOR\APPDATA\LOCAL\APPLICATION DATA" /NOCOPY /PURGE which then deletes all extra files that are in the directory that are not in empty. Works very quickly and effectively.
Before discovering the last technicque I formatted my drive the last time to correct this issue as the drive was empty anyway.
To prevent this from happening again I temporarily moved the local settings place holder out of the source directory and created the files local settings and application data with no extensions in there appropriate places to prevent robocopy from creating those directories in the first place. However while watching I didn't even see it attempt to do this (would have seen a cannot write destination or some error to that extent) so it seems removing the local settings place holder corrected it.
Just thought I would share and see if anyone could give some insight into this issue/bug.