Jump to content

I need some help sorting files.


grs
 Share

Recommended Posts

I need some help looking for some files.

I've got two folders A+B, there are a number of sub-folders too. Folder A has 7000 files and B has 7500 files, the first 7000 files are the same as folder A.

How can I find and isolate the 500 different files in folder B?

Link to comment
Share on other sites

If you are using windows XP download the XP SP2 Support Tools(It's not SP2, but additional toosl for advanced users)

The install it and go to a run prompt ("windows key + r")

Type DupFinder and check for duplicate files. :)

(Change options to check for CRC32 info and also sort by crc32)

edit: Oh, and you can export a text file to open in excel for making a quick bat script to go in and delete files you want to get rid of.

Link to comment
Share on other sites

Does Windows Support Tools run through cmd or is the GUI interface?

edit: nevermind I have it running now. dupfinder runs as a GUI.

As it turns out there are actually about 7500 files, total duplicate. I want to delete them so I have the remainder.

I have noticed I don't seem to be able to select several files at once to remove or delete them, I have to do each individually. It will take a while to go through but at least I don't have to manually check I'm not deleting a file I only have one copy of.

Link to comment
Share on other sites

Export the list. It gives you the full path to the files, delete one for each duplicate from the text file and then script it to delete the rest left in the file. Just make sur eyou backup everything first in case you delete the duplicate and the original.

Link to comment
Share on other sites

I want to delete both duplicates so I am left withonly non duplicated files. How would I script this?

First, backup your files. Then run DupFinder with CRC32 checking on and sort by CRC32. Export the file to OUTPUT.TXT. Open it in something like Excel or OpenOffice Calc(Spread sheet) with the default tab as a delimeter. Delete the right columns you don't need but keep the one with the file path and file name(Should be left with two colums, a and b ). Delete the first row for description, then one row for every duplicate (This saves one original file while leaving the rest to be deleted), insert a new column at the front of the sheet and enter "del" on the first line(Without quotes), select del and highlight all the cells below down to the last item to delete and do an edit, fill down(Pastes del into the column.) Save as delete.bat (Not del.bat or it will error out. You can't run a bat job with the same name as one of the commands in the bat itself!)

There will be a gap between the path and the file name and the delete command. Open the bat file in notepad(Right click and select edit) Highlight the space between them, copy it then hit ctrl+h to replace all to remove the spaces. Then copy the DEL part and do the same thing, only replace "del" with "del " with a space, without quotes. All file paths will need to have quotes around them if they have any spaces in their names though or are longer than 8 characters.

ex:

del "c:\documents and settings\somefolder\file1.txt"
del "c:\documents and settings\somefolder\file abc.txt"

Repeast the ctrl+h to add quotes around the paths.

You now have a bat script that deletes all the files listed in it.

This setup process is a bit dirty and time consuming. A nicer setup would be a script that just does all the comparing and deleting of matched crc32 hashed files, all in one step, but I don't have time to sit and try to write it myself. This setup I described above will work though, as I have used it myself for the very same thing. You can even test this out by creating a new folder and copying another folder of files into it multiple times and doing the same thing.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...