ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Finished Programs

DONE: Are any of the files missing???

<< < (2/5) > >>

4wd:
Using a bit of Google-fu:

This batch file will get you a list of files sans paths, (rename output file before running a second time):


--- Code: Text ---REM listfile.bat@echo offfor /r %1 %%g in (*) do echo %%~nxg>>list.txtsort list.txt /O sorted.txtdel list.txt
eg. listfile.bat c:\ will give you a file called sorted.txt containing a list of every file on C: drive

WinMerge, (free), will let you compare two text files for differences.

BTW, WinMerge will also compare folders but my way added a bit of scripting  :P

I suppose a simple GUI frontend could be made using Auto(It|HK) to automate all the steps, ie. pick two folders, hit Go.

nkormanik:

4wd, I, for one, would appreciate the GUI front end.

But even if you don't get the chance, thanks for the script above.

4wd:
TCBOO - output will open in your default text editor, where you can view or save it.

TCBOO = There Can Be Only One   :) (In honour of TaoPhoenix)



Only files that exist once will be listed.

The interface is self-explanatory, tool tips for everything of interest.

Caveats:

* It can, in theory, only handle about 16 million files but I still wouldn't like to wait for the output.  Technical reason: Array limits.
* It uses strings for the comparison, maximum string length is ~2 Giga-characters - which is a lot.  However, if you're are doing a lot of really deep nested files, then this limit may be exceeded but it would really have to be a lot.
* Source code is messy and uncommented but hey, that's the way I like it.  Technical reason: It keeps my brain active.
Update (starting at v0.4 which was a fairly large rewrite):

* Comparison speed has increased due to skwire pointing out a rather simpler way of doing things - thanks skwire!
* You can optionally exclude the folder tree, (relative to initial path), from the comparison
* Filters and Folders are written to an ini file, (same name as executable), when you exit
* It works for network shares, (ie. really hacky mod that stopped it is no more)
Update (v0.5)

* Uses a much faster sort routine.
Differences from previous version:

* It only looks for and removes from the output, files that occur in multiples of 2 - I had over-engineered the previous versions to remove any file that occurred 2 or more times, as skwire kindly pointed out  :-[
eg. So if a file exists 3 times, it will appear once in the output.  If it exists 4 times, it won't appear in the output. (Dependant on Different Tree setting)
How much faster is it from the previous version?
On my computer, (3.3GHz x6):
Previous version: 54548 filenames in 281 seconds, (HDD uncached read)
Version 0.4:        54550 filenames in 5 seconds, (HDD cached read)
Version 0.4:        253350 filenames in 63 seconds, (SSD uncached read)
Version 0.4:        253350 filenames in 28 seconds, (SSD cached read)

Most of the time is spent getting the file lists as from v0.5.

nkormanik:

Thanks for working on TIOOO, 4wd.

Would be a plus for the program to give some idea it's still chugging along, especially on large comparison jobs.  In present test the progress bar has already gone from left to right, but job appears incomplete.  I'll keep letting it run for... a week.

If job completes successfully, will a text file list of the one-only files appear in the TIOOO directory?

Thanks much!

=====


Okay, list popped up in my default editor.  Worked like a charm!


rjbull:
rjbull, DIR /B /S is good.  That can get us a list of files of both folders.  Then strip away path.  Once the two lists are in hand, what diff program would you use?
-nkormanik (June 25, 2012, 03:35 PM)
--- End quote ---
I realise you're sorted now, but for the record, I'd most probably use a the GNU port of Unix diff, see DiffUtils for Windows.

However, it now occurs to me that in your case, another Unix utility might be better, comm, e.g. the one contained in GNU utilities for Win32:
Usage: comm [OPTION]... LEFT_FILE RIGHT_FILE
Compare sorted files LEFT_FILE and RIGHT_FILE line by line.

  -1              suppress lines unique to left file
  -2              suppress lines unique to right file
  -3              suppress lines unique to both files
      --help      display this help and exit
      --version   output version information and exit

Report bugs to <[email protected]>.
If that appeals, you might also like a possibly more friendly alternative, File Intersection (fintrsct):
This program takes two text input files. It finds all the lines that are the same, and writes those out into a text file (defaults to common). Then it finds the lines that are unique to the first file and writes those out (defaults to unique1), and finds the lines that are unique to the second file (defaults to writing out to unique2). [...] original purpose was comparing system files like autoexec.bat between different systems in order to troubleshoot. My purpose was to help me back stuff up: I'd have a list of files (say, just for the sake of argument, a bunch of music files) that were on a CD, and a list of files that were in a folder, and this would help me figure out which were already backed up.
--- End quote ---

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version