Batch file compare two folders return files that aren't in one folder -
i'm trying make batch file compare 2 folders "core" , "custom" , return names of files aren't in custom.
so far have code, of taken form question on stack overflow. creates "arrays" of files in each folder. how can compare them?
@echo off setlocal enabledelayedexpansion ::build "array" of folders set foldercnt=0 /f "eol=: delims=" %%f in ('dir /b core') ( set /a foldercnt+=1 set "folder!foldercnt!=%%f" ) ::print menu /l %%m in (1 1 %foldercnt%) echo %%m - !folder%%m! echo( ::build "array" of folders set foldercnt=0 /f "eol=: delims=" %%f in ('dir /b custom') ( set /a foldercnt+=1 set "folder!foldercnt!=%%f" ) ::print menu /l %%n in (1 1 %foldercnt%) echo %%n - !folder%%n! echo( pause test.bat
how about
echo y|xcopy /l /d core\* custom\
which should list files in core not in custom or different version in core?
Comments
Post a Comment