Create Batch file but only to compare (no other action)

Get help for specific problems
Posts: 2
Joined: 29 Jul 2016

KMA1973

Hello,

I don't find any command line option that would allow me to just compare (without any other action) two folders and put the result in a txt log file.

It is possible in the GUI interface, by cliquing on the "Compare" button, but as I would like to check a lot of folders, this is not efficient and I would need to script it.

Maybe is it possible by customizing both xml file and ffs_batch file ???

The command line would then look like :

freefilesync.exe CompareOnly.xml CompareOnly.ffs.batch -LeftDir Folder1 -RightDir Folder2

Any help appreciated.

Thank you very much.

KMA.
Posts: 944
Joined: 8 May 2006

therube

UNIX(-like) diff command ?
diff.exe  -r  C:\Firefox46  C:\Firefox47
Files Firefox46/AccessibleMarshal.dll and Firefox47/AccessibleMarshal.dll differ
diff -r Firefox46/application.ini Firefox47/application.ini
8,9c8,9
< Version=46.0.1
< BuildID=20160502172042
---
> Version=47.0.1
> BuildID=20160623154057
11c11
< SourceStamp=0b8492c110bec959b94e3d54d5bd5ca7f7f97f6c
---
> SourceStamp=7f5abf95991bda0bc2b8e0d774a8866b726b312b
15,16c15,16
< MinVersion=46.0.1
< MaxVersion=46.0.1
---
> MinVersion=47.0.1
> MaxVersion=47.0.1
23c23
< ServerURL=https://crash-reports.mozilla.com/submit?id={ec8030f7-c20a-464f-9b0e-13a3a9e97384}&version=46.0.1&buildid=20160502172042
---
> ServerURL=https://crash-reports.mozilla.com/submit?id={ec8030f7-c20a-464f-9b0e-13a3a9e97384}&version=47.0.1&buildid=20160623154057
Files Firefox46/breakpadinjector.dll and Firefox47/breakpadinjector.dll differ
diff -r Firefox46/browser/blocklist.xml Firefox47/browser/blocklist.xml
2c2
< <blocklist xmlns="http://www.mozilla.org/2006/addons-blocklist" lastupdate="1461962224000">
---
> <blocklist xmlns="http://www.mozilla.org/2006/addons-blocklist" lastupdate="1466173918000">
366a367,375
>       <emItem  blockID="i1227" id="{A34CAF42-A3E3-11E5-945F-18C31D5D46B0}">
>                         <versionRange  minVersion="0" maxVersion="*" severity="1">
>                     </versionRange>
>                     <prefs>
>                   <pref>security.csp.enable</pref>
>                   <pref>security.fileuri.strict_origin_policy</pref>
>                   <pref>security.mixed_content.block_active_content</pref>
>               </prefs>
>     </emItem>
487a497,502
>       <emItem  blockID="i1229" id="/^.*@unblocker\.yt$/">
>                         <versionRange  minVersion="0" maxVersion="*" severity="3">
>                     </versionRange>
>                     <prefs>
>               </prefs>
>     </emItem>
979a995,1002
>       <emItem  blockID="i1222" id="tmbepff@trendmicro.com">
>                         <versionRange  minVersion="0" maxVersion="9.1.0.1035" severity="1">
>                     </versionRange>
>                                 <versionRange  minVersion="9.2" maxVersion="9.2.0.1023" severity="1">
>                     </versionRange>
>                     <prefs>
>               </prefs>
>     </emItem>
1114a1138,1143
>       <emItem  blockID="i1230" id="addon@gemaoff">
>                         <versionRange  minVersion="0" maxVersion="*" severity="3">
>                     </versionRange>
>                     <prefs>
>               </prefs>
>     </emItem>
1438a1468,1473
>       <emItem  blockID="i1231" id="youtube@downloader.yt">
>                         <versionRange  minVersion="0" maxVersion="*" severity="3">
>                     </versionRange>
>                     <prefs>
>               </prefs>
>     </emItem>
1474a1510,1515
>       <emItem  blockID="i1212" id="unblocker20@unblocker.yt">
>                         <versionRange  minVersion="0" maxVersion="2.0.0" severity="3">
>                     </versionRange>
>                     <prefs>
>               </prefs>
>     </emItem>
1488a1530,1538
>       <emItem  blockID="i1232" id="nosquint@urandom.ca">
>                         <versionRange  minVersion="0" maxVersion="2.1.9.1-signed.1-signed" severity="1">
>                       <targetApplication  id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
>                               <versionRange  minVersion="47" maxVersion="*" />
>                           </targetApplication>
>                     </versionRange>
>                     <prefs>
>               </prefs>
>     </emItem>
1643a1694,1699
>       <emItem  blockID="i1228" id="unblocker30__web@unblocker.yt">
>                         <versionRange  minVersion="0" maxVersion="*" severity="3">
>                     </versionRange>
>                     <prefs>
>               </prefs>
>     </emItem>
1905a1962,1967
>       <emItem  blockID="i1214" id="firefoxdav@icloud.com">
>                         <versionRange  minVersion="0" maxVersion="1.4.22" severity="1">
>                     </versionRange>
>                     <prefs>
>               </prefs>
>     </emItem>
1967a2030,2041
>       <emItem  blockID="i1210" id="auto-plugin-checker@jetpack">
>                         <versionRange  minVersion="0" maxVersion="*" severity="1">
>                     </versionRange>
>                     <prefs>
>               </prefs>
>     </emItem>
>       <emItem  blockID="i1233" id="cloudmask@cloudmask.com">
>                         <versionRange  minVersion="0" maxVersion="2.0.788">
>                     </versionRange>
>                     <prefs>
>               </prefs>
>     </emItem>
2128a2203,2208
>       <emItem  blockID="i1211" id="flvto@hotger.com">
>                         <versionRange  minVersion="0" maxVersion="*" severity="1">
>                     </versionRange>
>                     <prefs>
>               </prefs>
>     </emItem>
2508a2589,2594
>       <emItem  blockID="i1213" id="unblocker20__web@unblocker.yt">
>                         <versionRange  minVersion="0" maxVersion="*" severity="3">
>                     </versionRange>
>                     <prefs>
>               </prefs>
>     </emItem>
3444a3531,3542
>       <pluginItem  os="Linux" blockID="p1224">
>                   <match name="filename" exp="libflashplayer\.so" />                      <versionRange  minVersion="11.2.202.577" maxVersion="11.2.202.616" severity="0" vulnerabilitystatus="1"></versionRange>
>                             <infoURL>https://get.adobe.com/flashplayer/</infoURL>
>           </pluginItem>
>       <pluginItem  blockID="p1225">
>                   <match name="filename" exp="(NPSWF32.*\.dll)|(NPSWF64.*\.dll)|(Flash\ Player\.plugin)" />                      <versionRange  minVersion="18.0.0.333" maxVersion="18.0.0.343" severity="0" vulnerabilitystatus="1"></versionRange>
>                             <infoURL>https://get.adobe.com/flashplayer/</infoURL>
>           </pluginItem>
>       <pluginItem  blockID="p1226">
>                   <match name="filename" exp="(NPSWF32.*\.dll)|(NPSWF64.*\.dll)|(Flash\ Player\.plugin)" />                      <versionRange  minVersion="21.0.0.197" maxVersion="21.0.0.226" severity="0" vulnerabilitystatus="1"></versionRange>
>                             <infoURL>https://get.adobe.com/flashplayer/</infoURL>
>           </pluginItem>
3597c3695,3701
<     <gfxBlacklistEntry  blockID="g1208">      <os>All</os>      <vendor>0x8086</vendor>            <feature>FEATURE_HARDWARE_VIDEO_DECODING</feature>      <featureStatus>BLOCKED_DRIVER_VERSION</featureStatus>      <driverVersion>10.18.10.3947</driverVersion>      <driverVersionComparator>EQUAL</driverVersionComparator>    </gfxBlacklistEntry>
---
>     <gfxBlacklistEntry  blockID="g1215">      <os>WINNT 5.1</os>      <vendor>0x8086</vendor>            <feature>HARDWARE_VIDEO_DECODING</feature>      <featureStatus>BLOCKED_DRIVER_VERSION</featureStatus>      <driverVersion>10.18.10.3947</driverVersion>      <driverVersionComparator>EQUAL</driverVersionComparator>    </gfxBlacklistEntry>
>     <gfxBlacklistEntry  blockID="g1216">      <os>WINNT 5.2</os>      <vendor>0x8086</vendor>            <feature>HARDWARE_VIDEO_DECODING</feature>      <featureStatus>BLOCKED_DRIVER_VERSION</featureStatus>      <driverVersion>10.18.10.3947</driverVersion>      <driverVersionComparator>EQUAL</driverVersionComparator>    </gfxBlacklistEntry>
>     <gfxBlacklistEntry  blockID="g1217">      <os>WINNT 6.0</os>      <vendor>0x8086</vendor>            <feature>HARDWARE_VIDEO_DECODING</feature>      <featureStatus>BLOCKED_DRIVER_VERSION</featureStatus>      <driverVersion>10.18.10.3947</driverVersion>      <driverVersionComparator>EQUAL</driverVersionComparator>    </gfxBlacklistEntry>
>     <gfxBlacklistEntry  blockID="g1218">      <os>WINNT 6.1</os>      <vendor>0x8086</vendor>            <feature>HARDWARE_VIDEO_DECODING</feature>      <featureStatus>BLOCKED_DRIVER_VERSION</featureStatus>      <driverVersion>10.18.10.3947</driverVersion>      <driverVersionComparator>EQUAL</driverVersionComparator>    </gfxBlacklistEntry>
>     <gfxBlacklistEntry  blockID="g1219">      <os>WINNT 6.2</os>      <vendor>0x8086</vendor>            <feature>HARDWARE_VIDEO_DECODING</feature>      <featureStatus>BLOCKED_DRIVER_VERSION</featureStatus>      <driverVersion>10.18.10.3947</driverVersion>      <driverVersionComparator>EQUAL</driverVersionComparator>    </gfxBlacklistEntry>
>     <gfxBlacklistEntry  blockID="g1220">      <os>WINNT 6.3</os>      <vendor>0x8086</vendor>            <feature>HARDWARE_VIDEO_DECODING</feature>      <featureStatus>BLOCKED_DRIVER_VERSION</featureStatus>      <driverVersion>10.18.10.3947</driverVersion>      <driverVersionComparator>EQUAL</driverVersionComparator>    </gfxBlacklistEntry>
>     <gfxBlacklistEntry  blockID="g1221">      <os>WINNT 10.0</os>      <vendor>0x8086</vendor>            <feature>HARDWARE_VIDEO_DECODING</feature>      <featureStatus>BLOCKED_DRIVER_VERSION</featureStatus>      <driverVersion>10.18.10.3947</driverVersion>      <driverVersionComparator>EQUAL</driverVersionComparator>    </gfxBlacklistEntry>
Files Firefox46/browser/components/browsercomps.dll and Firefox47/browser/components/browsercomps.dll differ
Files Firefox46/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}.xpi and Firefox47/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}.xpi differ
Files Firefox46/browser/features/e10srollout@mozilla.org.xpi and Firefox47/browser/features/e10srollout@mozilla.org.xpi differ
Files Firefox46/browser/features/firefox@getpocket.com.xpi and Firefox47/browser/features/firefox@getpocket.com.xpi differ
Files Firefox46/browser/features/loop@mozilla.org.xpi and Firefox47/browser/features/loop@mozilla.org.xpi differ
Files Firefox46/browser/omni.ja and Firefox47/browser/omni.ja differ
Files Firefox46/crashreporter.exe and Firefox47/crashreporter.exe differ
Files Firefox46/firefox.exe and Firefox47/firefox.exe differ
Files Firefox46/freebl3.chk and Firefox47/freebl3.chk differ
Files Firefox46/freebl3.dll and Firefox47/freebl3.dll differ
Files Firefox46/gmp-clearkey/0.1/clearkey.dll and Firefox47/gmp-clearkey/0.1/clearkey.dll differ
Files Firefox46/icudt56.dll and Firefox47/icudt56.dll differ
Files Firefox46/icuin56.dll and Firefox47/icuin56.dll differ
Files Firefox46/icuuc56.dll and Firefox47/icuuc56.dll differ
Files Firefox46/lgpllibs.dll and Firefox47/lgpllibs.dll differ
Files Firefox46/libEGL.dll and Firefox47/libEGL.dll differ
Files Firefox46/libGLESv2.dll and Firefox47/libGLESv2.dll differ
Files Firefox46/maintenanceservice.exe and Firefox47/maintenanceservice.exe differ
Files Firefox46/maintenanceservice_installer.exe and Firefox47/maintenanceservice_installer.exe differ
Files Firefox46/mozavcodec.dll and Firefox47/mozavcodec.dll differ
Files Firefox46/mozavutil.dll and Firefox47/mozavutil.dll differ
Files Firefox46/mozglue.dll and Firefox47/mozglue.dll differ
Files Firefox46/nss3.dll and Firefox47/nss3.dll differ
Files Firefox46/nssckbi.dll and Firefox47/nssckbi.dll differ
Files Firefox46/nssdbm3.chk and Firefox47/nssdbm3.chk differ
Files Firefox46/nssdbm3.dll and Firefox47/nssdbm3.dll differ
Files Firefox46/omni.ja and Firefox47/omni.ja differ
diff -r Firefox46/platform.ini Firefox47/platform.ini
2,4c2,3
< BuildID=20160502172042
< Milestone=46.0.1
< SourceStamp=0b8492c110bec959b94e3d54d5bd5ca7f7f97f6c
---
> BuildID=20160623154057
> Milestone=47.0.1
5a5
> SourceStamp=7f5abf95991bda0bc2b8e0d774a8866b726b312b
Files Firefox46/plugin-container.exe and Firefox47/plugin-container.exe differ
Files Firefox46/plugin-hang-ui.exe and Firefox47/plugin-hang-ui.exe differ
Files Firefox46/sandboxbroker.dll and Firefox47/sandboxbroker.dll differ
Files Firefox46/setup.exe and Firefox47/setup.exe differ
Files Firefox46/softokn3.chk and Firefox47/softokn3.chk differ
Files Firefox46/softokn3.dll and Firefox47/softokn3.dll differ
Files Firefox46/uninstall/helper.exe and Firefox47/uninstall/helper.exe differ
diff -r Firefox46/uninstall/uninstall.update Firefox47/uninstall/uninstall.update
3,5c3,5
< INSTALLATION DIRECTORY C:\WLIB\FIREFOX\Firefox46
< WORKING DIRECTORY C:\WLIB\FIREFOX\Firefox46\updated
< Begin moving destDir (C:\WLIB\FIREFOX\Firefox46) to tmpDir (C:\WLIB\FIREFOX\Firefox46.bak)
---
> INSTALLATION DIRECTORY C:\WLIB\FIREFOX\Firefox47
> WORKING DIRECTORY C:\WLIB\FIREFOX\Firefox47\updated
> Begin moving destDir (C:\WLIB\FIREFOX\Firefox47) to tmpDir (C:\WLIB\FIREFOX\Firefox47.bak)
7c7
< Begin moving newDir (C:\WLIB\FIREFOX\Firefox46.bak/updated) to destDir (C:\WLIB\FIREFOX\Firefox46)
---
> Begin moving newDir (C:\WLIB\FIREFOX\Firefox47.bak/updated) to destDir (C:\WLIB\FIREFOX\Firefox47)
10,11c10,11
< ensure_remove: failed to remove file: C:\WLIB\FIREFOX\Firefox46.bak/updater.exe, rv: -1, err: 13
< ensure_remove_recursive: unable to remove directory: C:\WLIB\FIREFOX\Firefox46.bak, rv: -1, err: 41
---
> ensure_remove: failed to remove file: C:\WLIB\FIREFOX\Firefox47.bak/updater.exe, rv: -1, err: 13
> ensure_remove_recursive: unable to remove directory: C:\WLIB\FIREFOX\Firefox47.bak, rv: -1, err: 41
13c13
< remove_recursive_on_reboot: file will be removed on OS reboot: C:\WLIB\FIREFOX\Firefox46\tobedeleted\rep2507.tmp
---
> remove_recursive_on_reboot: file will be removed on OS reboot: C:\WLIB\FIREFOX\Firefox47\tobedeleted\repEE.tmp
Files Firefox46/updater.exe and Firefox47/updater.exe differ
Files Firefox46/voucher.bin and Firefox47/voucher.bin differ
Files Firefox46/webapp-uninstaller.exe and Firefox47/webapp-uninstaller.exe differ
Files Firefox46/webapprt/omni.ja and Firefox47/webapprt/omni.ja differ
diff -r Firefox46/webapprt/webapprt.ini Firefox47/webapprt/webapprt.ini
10,11c10,11
< Version=46.0.1
< BuildID=20160502172042
---
> Version=47.0.1
> BuildID=20160623154057
15,16c15,16
< MinVersion=46.0.1
< MaxVersion=46.0.1
---
> MinVersion=47.0.1
> MaxVersion=47.0.1
20c20
< ServerURL=https://crash-reports.mozilla.com/submit?id=webapprt@mozilla.org&version=46.0.1&buildid=20160502172042
---
> ServerURL=https://crash-reports.mozilla.com/submit?id=webapprt@mozilla.org&version=47.0.1&buildid=20160623154057
Files Firefox46/webapprt-stub.exe and Firefox47/webapprt-stub.exe differ
Files Firefox46/wow_helper.exe and Firefox47/wow_helper.exe differ
Files Firefox46/xul.dll and Firefox47/xul.dll differ
Usage: diff [OPTION]... FILES
Compare files line by line.

  -i  --ignore-case  Ignore case differences in file contents.
  --ignore-file-name-case  Ignore case when comparing file names.
  --no-ignore-file-name-case  Consider case when comparing file names.
  -E  --ignore-tab-expansion  Ignore changes due to tab expansion.
  -b  --ignore-space-change  Ignore changes in the amount of white space.
  -w  --ignore-all-space  Ignore all white space.
  -B  --ignore-blank-lines  Ignore changes whose lines are all blank.
  -I RE  --ignore-matching-lines=RE  Ignore changes whose lines all match RE.
  --strip-trailing-cr  Strip trailing carriage return on input.
  --binary  Read and write data in binary mode.
  -a  --text  Treat all files as text.

  -c  -C NUM  --context[=NUM]  Output NUM (default 3) lines of copied context.
  -u  -U NUM  --unified[=NUM]  Output NUM (default 3) lines of unified context.
    --label LABEL  Use LABEL instead of file name.
    -p  --show-c-function  Show which C function each change is in.
    -F RE  --show-function-line=RE  Show the most recent line matching RE.
  -q  --brief  Output only whether files differ.
  -e  --ed  Output an ed script.
  --normal  Output a normal diff.
  -n  --rcs  Output an RCS format diff.
  -y  --side-by-side  Output in two columns.
    -W NUM  --width=NUM  Output at most NUM (default 130) print columns.
    --left-column  Output only the left column of common lines.
    --suppress-common-lines  Do not output common lines.
  -D NAME  --ifdef=NAME  Output merged file to show `#ifdef NAME' diffs.
  --GTYPE-group-format=GFMT  Similar, but format GTYPE input groups with GFMT.
  --line-format=LFMT  Similar, but format all input lines with LFMT.
  --LTYPE-line-format=LFMT  Similar, but format LTYPE input lines with LFMT.
    LTYPE is `old', `new', or `unchanged'.  GTYPE is LTYPE or `changed'.
    GFMT may contain:
      %<  lines from FILE1
      %>  lines from FILE2
      %=  lines common to FILE1 and FILE2
      %[-][WIDTH][.[PREC]]{doxX}LETTER  printf-style spec for LETTER
        LETTERs are as follows for new group, lower case for old group:
          F  first line number
          L  last line number
          N  number of lines = L-F+1
          E  F-1
          M  L+1
    LFMT may contain:
      %L  contents of line
      %l  contents of line, excluding any trailing newline
      %[-][WIDTH][.[PREC]]{doxX}n  printf-style spec for input line number
    Either GFMT or LFMT may contain:
      %%  %
      %c'C'  the single character C
      %c'\OOO'  the character with octal code OOO

  -l  --paginate  Pass the output through `pr' to paginate it.
  -t  --expand-tabs  Expand tabs to spaces in output.
  -T  --initial-tab  Make tabs line up by prepending a tab.
  --tabsize=NUM  Tab stops are every NUM (default 8) print columns.

  -r  --recursive  Recursively compare any subdirectories found.
  -N  --new-file  Treat absent files as empty.
  --unidirectional-new-file  Treat absent first files as empty.
  -s  --report-identical-files  Report when two files are the same.
  -x PAT  --exclude=PAT  Exclude files that match PAT.
  -X FILE  --exclude-from=FILE  Exclude files that match any pattern in FILE.
  -S FILE  --starting-file=FILE  Start with FILE when comparing directories.
  --from-file=FILE1  Compare FILE1 to all operands.  FILE1 can be a directory.
  --to-file=FILE2  Compare all operands to FILE2.  FILE2 can be a directory.

  --horizon-lines=NUM  Keep NUM lines of the common prefix and suffix.
  -d  --minimal  Try hard to find a smaller set of changes.
  --speed-large-files  Assume large files and many scattered small changes.

  -v  --version  Output version info.
  --help  Output this help.

FILES are `FILE1 FILE2' or `DIR1 DIR2' or `DIR FILE...' or `FILE... DIR'.
If --from-file or --to-file is given, there are no restrictions on FILES.
If a FILE is `-', read standard input.
Exit status is 0 if inputs are the same, 1 if different, 2 if trouble.

Report bugs to <bug-gnu-utils@gnu.org>.