Suggestions for Compare Folder Tree routine

Apr 2, 2011
North Carolina, USA

I was wondering if anyone already had a script or utility that would escentially copare folder trees, like this:

CompareTrees /S1=C:\TopFldr1 /S2=D:\Charles\TopFldr2 /D=3 /Delete=Yes /When=Yes /ByByte=Yes /CASE=Yes

The routine would start for each fies in and under the folder specified by the /S1= parameter would see if the same file existed in the same folder tree starting at the /S2= parameter existed, had the:

- same date/time (/When=Yes (would check for each YMDHMSD),
- same file name (/CASE=Yes),
- and the same contents (either by a byte by bype comparison or the CRC32 vaue,
- if /Delete=Yes is specified - the file in the S1 tree would be deleted.
- the /D=3 would make sure the rightmost number of folder names was the same.

The reason why I would like this is that I use DoubleKillerPro.exe from Big Bang Enterprises but it it does not also compare folder trees - which at times is important to me.
May 20, 2008
Elkridge, MD, USA
I have a routine that does something similar. To compare file bodies, I use TCC's @compare function, which is more efficient in case of mismatch (it stops reading both files at the first mismatch, while any hash function must completely process both files, and has a miniscule probability of a false match), and probably faster even in case of a match - no need to hash. It has the option to iterate through the whole directory (not folder) tree. It reports files only in tree 1, files only in tree 2, files identical in the two trees, and files that differ. Since it is a TCC batch program, operating on Windows file systems, file names and paths are not case sensitive.
Apr 2, 2011
North Carolina, USA
thnak you for the reply Steve. I'd be interested in looking at a copy of the routine please.....
May 20, 2008
Elkridge, MD, USA
It needs a little clean-up, because currently it assumes that it copies from F: to Z:, with source and target directories named identically - originally intended to back up selected directories from my desktop to my laptop. I myself now want it to work with arbitrary top levels for the source and the target tree.
Similar threads
Thread starter Title Forum Replies Date
rconn News Take Command v25 Suggestions Support 0
rconn News Suggestions Forum Support 8
D Started suggestions, not in this version (yet?) Support 1
S Closing date for V16 suggestions Support 1
J Suggestions... Support 1
S HELP suggestions - What's New page Support 3
S V12 suggestions Support 0
M Any suggestions for Windows 7 Virtual PC? Support 3
dcantor Comments and suggestions on functions for binary buffers Support 4
C Few questions and suggestions Support 2
rconn Suggestions for v10 Support 5
R How to? Compare executables' version/build # including 123.456.789.01 Support 10
M How to? Compare file timestamps accross different file systems... Support 1
C custom string compare? Support 8
MickeyF how to compare version strings Support 11
R best file compare util Support 5
deleyd Need example of @COMPARE Support 1
p.f.moore Compare 2 directories Support 8 Startup Folder? Support 3
C writing folder names with JPSoft special chars like &...... Support 4
R How to? Set default application in a special folder Support 4
R How to? Open Take Command at current folder Support 7
D How to? Pass OpenHere Folder to CMD? Support 6
Chen Touboul When i try to delete an empty folder i got "the dirctoy name is invalid" Support 3
C How to bypass UAC warning when shortcut in \Startup folder ? Support 9
CWBillow Clearing out the Windows Temp folder Support 2
J directory or folder to start in Support 2
vefatica Refresh a folder in File Explorer? Support 0
P How to? Delete subfolders but not the folder itself Support 11
vefatica Shortcut/start-up folder nonsense Support 20
cgunhouse Crash on View/Folder Support 1
D Fixed Cut and paste in TC's file/folder view does not remove file Support 17
D Version 18 changed the naming convention of TC's folder Support 5
C How to? COPY ftp folder query Support 7
fpefpe How to? folder / explorer window Support 10
rps Documentation Folder combo box docs Support 1
J Startup folder Support 6
C DEL, connected Web folder, report Support 1
T How to? Adding TCC to startup folder Support 6
jbanaszczyk TCMD 16 Install - download folder Support 2
I How to? Save and restore folder timestamps Support 22
gschizas How to? How can I use select with a folder that already contains parentheses? Support 7
J Change folder TCC starts in Support 2
gschizas Installation folder for TCMD x64 15.1 is wrong Support 5
D Folder/List view changed in v15 Support 8
C Startup folder not working on v15 Support 6
N WAD Take Command and UNCs for Folder List Support 10
M Sync folder/list view with command window? Support 2
aedthuio Folder with space char Support 6
fpefpe How to? Plugin Folder Support 1

Similar threads