Hi, I want a shell script which compare two folders (with some similar files) and get new files and the files which are modified.
It will be good if the new and the modified files moved to third folder.I have the following script, which identifies the new script and find the comarision of the files and store in log files. I am unable to get the modified file names.
Please look and help----------------------------------------------------------------------------------------------------
if exist compare.log del compare.log
if exist missing.log del missing.log
for /f "delims=" %%a in ('dir /b/a-d "C:\TFSworkspace\Scripts"') do (
if exist "C:\tfs\Scripts\%%a" (
fc "C:\TFSworkspace\Scripts\%%a" "C:\tfs\Scripts\%%a" >> compare.log
) else (
echo %%a >> missing.log
)
)
-------------------------------------------------------------------------------------------------------------
Don't know if this would be the most efficient but have you tried using the "comp" command on existing files? hth
Elinor Hurst
http://elinorhurst.blogspot.com
Yes (14) | ![]() | |
No (14) | ![]() | |
I don't know (15) | ![]() |