Trying to delete an endless lot of Application Data folders

yboivin

Honorable
Apr 30, 2013
7
0
10,510
Hi,

Here is the situation (Windows 7 Ultimate French): In an effort to safeguard my User folder, I used Robocopy on c:\Users\Yves to r:\Miroir\Yves's Documents. It copied for a time before I realized how BIG this folder is and since I'm short on storage on R, I stopped it.

Then I went on to delete the R:\Miroir\Yves's Documents folder but it stop saying that some filenames are too long, 5,989 of them !

I pressed Cancel and tried to navigate the structure left to be deleted. It's AppData... There's some 35 levels of the same folder, same name...

When I come to the 36th level, I find some files, copies of the originals... And... AppData again !

At the final level, I have most files that are present in the User directory. Most of them are compressed (Blue) but some of them are Black and don't open and are not identified as folders...

The C: drive is uncompressed (Black filenames) and the R: drive is (Blue filenames).

I'm not quite sure what are the Black folders but they don't delete and I'm thinking about Junction Points...

But I have no more knowledge about those, else that they exists and points most probably to the C: ones...

How should I proceed to remove, safely, all that Junk on the R: drive without affecting the C: drive ?

I'm open to all suggestions !

Yves
 

yboivin

Honorable
Apr 30, 2013
7
0
10,510


Well, that's the thing... When I get to the final level of AppData, it contains an AppData that's colored Black, listed as a Folder but won't delete at all... I pressed del 10 times like an idiot and nothing happens !

I tried to delete a black file and it says the the filename is too long ! But when I try to rename it, there is no option to rename, just Open, Send To and Pin to... Ultimately, all folders contains black files or folders that won't delete !

Well, I'm lost.
 

ShadeTreeTech

Distinguished
Jun 23, 2011
95
0
18,660
Don't use the gui, use a command prompt.
1) Navagate to the root folder. ie "cd R:\Miroir\Yves's Documents\AppData"
2) Use the del command. "del /f /s /q *.*" This should delete everything from the folder you currently reside in and everything that is a sub directory from there. Please be very careful. This command using those switches doesn't prompt you for anything, it just does it. Triple check that you are in a folder that you want the contents deleted as well because it will delete EVERYTHING in the CURRENT folder and then move down the sub folders from there.

Robocopy should not have set NTFS junction points. I am not overly familiar with Robocopy, but I know what it is and have used it. Setting junction points would be defeating the point of copying the data to begin with. Likely there were root folders that had links (shortcuts) back to previous directories which caused the loop. This isn't unusual when you are copying system drives/folders. Often times you can see that the new folders will be larger than the old folder due to this. It's odd that it looped that many times. Anywho... try that and see if it clears the folders and content for you.
 

yboivin

Honorable
Apr 30, 2013
7
0
10,510


Hello,

I tried that and it comes back with a "filename too long"... I tried RD /s /q on a folder like "Google" and it's coming back with "the path is not existent" (I try to translate from memory from French to English) and I know it's there, I see it when I do dir !

Well, the good thing is that I have a "true" duplicate of that drive on two separate drives (including Yves's sh****) and I can most likely format the R: drive and robocopy everything back but that's a PITA as there is 600 gigs to move...

As an aside, from the log of last night Robocopy, there are 25 460 files in Yves's Documents as compared to 10 000 relevent ! So there is 2.5 times bad stuff as there is good stuff !

Any other suggestions ? Or a software that would kill the thing ?
 

yboivin

Honorable
Apr 30, 2013
7
0
10,510
Well,
An answer of sorts:
First MU Commander works great ! It deleted the whole directory whit only some error messages... Just hit retry and everything went away...

The problem is that: those BLACK folders and files WERE junction points to the c:\Users directory ! I have lost SOME of the files and directories but fortunately I have a recent Ghost image (6 days ago) that will hopefully restore everything back in the C:\Users directroy.

For anyone that reads this: Robocopy does somehow create junction points and there's even options to exclude those /XJ, /XJD and /XJF.

So, battle won, until the restore works !