Hi all,
I had a hard drive problem and some of my files were damaged.
I have a backup but from the damaged drive I can still get some information.
So i need to build a script to analize my drive and copy all the content to my backup disk.
The problem is using
xcopy source destination /s /d
I get all the files on the orignal hard drive overwriting the backup files, even the damaged ones with 0 byte size...
So I need first to find and delete those 0 byte files and then copy all the others.
Can you help me?
Delete 0 byte files
Moderator: DosItHelp
Re: Delete 0 byte files
Thanks! I've seen it already but i need it to go throug all the folders and first I wanto to run it in "test mode", like creating a text file with all before deleting them.
Re: Delete 0 byte files
Have you read the help for the DIR, FOR and FORFILES commands. All of them have options to recurse into subdirectories.
Re: Delete 0 byte files
If you are serious about data recovery, and you only have one backup, then you first need to create a second copy of the backup drive - in case the other hard drive fails or becomes corrupted too.
Copying files from a damaged drive onto your only backup is foolish, and from what you've said this is what you plan to do.
I would also make a copy of the damaged drive onto another hard drive too - if it has more up to date files than your backup has.
Copying files from a damaged drive onto your only backup is foolish, and from what you've said this is what you plan to do.
I would also make a copy of the damaged drive onto another hard drive too - if it has more up to date files than your backup has.
-
- Posts: 10
- Joined: 21 Nov 2013 01:07
Re: Delete 0 byte files
They are often put in the "temporary internet files" by some program and when trying to delete an old user profile it prevents the deletion.