Batch file that compares folder contents

December 27, 2010 at 10:39:40
Specs: Windows XP
I was wondering if someone could help me write a batch file that compares the contents of two folders (Folder “A” and Folder “B”) and if they are not the same, copy the contents of folder “A” to folder “B”.

Thanks for any help in advance.


See More: Batch file that compares folder contents

Report •


#1
December 27, 2010 at 10:48:17
@echo off & setLocal EnableDELAYedeXpansion

for /f "tokens=* delims= " %%a in ('dir/b/a-d A') do (
if not exist "B\%%a" copy "%%a" B\
)


=====================================
Life is too important to be taken seriously.

M2


Report •

#2
December 27, 2010 at 13:12:33
Works perfect! Thank you so much for your quick response.

Report •

Related Solutions


Ask Question