View Single Post
Old 25-10-2005, 13:52   #3
Paddy1
cf.addict
 
Join Date: Jul 2004
Posts: 352
Paddy1 has a reputation beyond reputePaddy1 has a reputation beyond reputePaddy1 has a reputation beyond reputePaddy1 has a reputation beyond reputePaddy1 has a reputation beyond reputePaddy1 has a reputation beyond reputePaddy1 has a reputation beyond reputePaddy1 has a reputation beyond reputePaddy1 has a reputation beyond reputePaddy1 has a reputation beyond reputePaddy1 has a reputation beyond reputePaddy1 has a reputation beyond reputePaddy1 has a reputation beyond repute
Re: Finding corrupt files on my work's shared drive?

Your filenames are all hex numbers and so can only start with 0-9 or a-f and are always 8 characters long. You can make use of this.

Save the following to a file called filelist.bat in the root of your drive.

dir /s /b 0???????.* > kill.bat
dir /s /b 1???????.* >> kill.bat
dir /s /b 2???????.* >> kill.bat
dir /s /b 3???????.* >> kill.bat
dir /s /b 4???????.* >> kill.bat
dir /s /b 5???????.* >> kill.bat
dir /s /b 6???????.* >> kill.bat
dir /s /b 7???????.* >> kill.bat
dir /s /b 8???????.* >> kill.bat
dir /s /b 9???????.* >> kill.bat
dir /s /b a???????.* >> kill.bat
dir /s /b b???????.* >> kill.bat
dir /s /b c???????.* >> kill.bat
dir /s /b d???????.* >> kill.bat
dir /s /b e???????.* >> kill.bat
dir /s /b f???????.* >> kill.bat

Open a dos prompt, go to the root of your drive and type

@filelist

Then edit kill.bat to remove any files you want to keep. Add "del " without the quotes to the start of each line and save the file.

Then type @kill to execute the batch file. This will delete the filenames that you left in the file.
Paddy1 is offline   Reply With Quote