View Single Post
Old 06-16-2009, 01:31 PM   #2 (permalink)
TheOutcaste
TSF Enthusiast
 
TheOutcaste's Avatar
 
Join Date: Mar 2009
Location: Portland, OR
Posts: 826
OS: MS-Dos 6.22 - Win7


Re: Creating batch file to Check Directories

Welcome to TSF!

The code you posted will display all files that are in DirA that are not in DirB, though it needs some quotes to work with folder names that have spaces:
Code:
dir /B /O "%dirA%" >dirA.txt
dir /B /O "%dirB%" >dirB.txt
Are you wanting to also compare subfolders? Meaning compare two complete trees, not just the folders?
So not only compare DirA to DirB, but DirA\Sub1 to DirB\Sub1, and DirA\Sub1\SubSub1 to DirB\Sub1\SubSub1?

Or do you just want to find out if a file anywhere in the DirA tree exists anywhere in the DirB tree?
So if File1.txt exists in DirA (DirA\File1.txt) and is found in DirB\Sub1 (DirB\Sub1\File1.txt) it would not be listed?

Jerry
__________________
Microsoft MVP - Windows Desktop Experience
Of course I know all the answers; I just don't always match the answers to the right questions.
Rated R for Violence -- When your PC flies through a window, that's violent, right?
TheOutcaste is offline   Reply With Quote