Direkt zum Inhalt

How to safely remove Temp Recovery files with name as *~????????

Thread solved

On my C:\ drive I have many files that are duplicated but with ~xxxxxxxx appended to the filename. Where 'x' is a uppercase letter or number. From my research, this is most likely from an Acronis TI restore that was interrupted. I just discovered this so I have no idea when this occurred. The oldest backup I have has these files in the backup. So restoring a backup does not seem to be an option.

How do I safely remote these files? I have tried various CMDs to find the files using wildcards but with limited success. A 'dir' listing has extra files that aren't the recover files so I haven't been able to use that. The issue may be that '~' is also used in the Windows 8.3 file names and may be messing with the 'dir' cmds I'm trying. Is there a Power Shell variation that would work?

At this point, I just want to get rid of the files.

Thanks.

0 Users found this helpful

Where are these files located? Can you be more specific about the names? How many are there? If it's a one shot delete, can you just do it manually from Explorer?

John, files named as indicated in your initial post normally arise from an incomplete recovery that was interrupted, as otherwise the recovery operation would automatically resolve the names to the final restored files.

BrunoC wrote:

Where are these files located? Can you be more specific about the names? How many are there? If it's a one shot delete, can you just do it manually from Explorer?

Yes, I could have been more detailed. When I first posted this I had little idea how many temp restore files where on my system and where they all were. So I was asking if anyone has encountered this and if so, is there a known way to find and delete them all (avoid re-inventing the wheel).

The files seem to be on the C:\ drive, mostly in the C:\Program Files folder. But I'm finding them scattered in various other folders. My backup jobs are separate for each of the disks in my system. Yes, I am aware that the files are most likely due to an interrupted restore, so the C:\ restore must have failed sometime in the past.

I'm a little rusty on searching using regex expressions and such. My attempts to find the temp restore files with regular expressions in Explorer and Command is finding more files than they should (files that are clearly NOT the backup files). I'm still trying to figure out why. So, I'm cautious about using the expressions to find and delete the files using a CMD script. (I'm even rustier using Power Shell.)

What I'm doing is using the command dir *~???????? /B /S /A:-D to find the files. But it is finding many more than expected. (So I can't just put that in a for loop or other command line). Then pipe that to a file, editing it and making it into a bat file with a bunch of delete cmds. Then for many of them I didn't have permissions to delete the files, even as Administrator. So I had to take the list and change permissions. Anyway that's the way I've done it.

It's taking me hours to find and delete them (using CMD commands). I started with over 28,000, now it looks like I'm down to 38 left. So, I'm almost done. I'm sure the methods I'm using are much more time consuming than needs to be. If someone already has a method to do this, I think it would be very helpful to other users that encounter this.

I found a command that works to find the Acronis temporary backup files:

dir /B /S /A:-D | findstr /I /R /c:"~[0-9a-z][0-9a-z]*$"

It's not guaranteed to only find them, but it's pretty close. I'm finished. Thanks for indulging me.