Compare same file in different folders

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • m6rk
    New User
    • Jan 2014
    • 1

    Compare same file in different folders

    I have a structure like this:

    F:/c1/spcode.xml
    F:/c2/spcode.xml
    F:/c3/spcode.xml
    ..
    F:/c1000/spcode.xml

    How would I compare all versions of spcode.xml against the file in folder f:/c1 ?
  • hartungr
    Enthusiast
    • Apr 2005
    • 47

    #2
    One idea is to run the compare commands from a batch file. In windows, the for command has a /L option to define a range

    for /L %%r in (2, 1, 1000) do bcomp f:\c1\spcode.xml f:\c%%r\spcode.xml

    Comment

    • Aaron
      Team Scooter
      • Oct 2007
      • 16011

      #3
      Since all of the files have the exact same name, you would need to pass in pairs of files to a command line (similar to Bob's).

      bcomp.com /qc "F:\c2\spcode.xml" "F:\c1\spcode.xml"
      echo %ErrorLevel%
      bcomp.com /qc "F:\c3\spcode.xml" "F:\c1\spcode.xml"
      echo %ErrorLevel%
      etc
      Aaron P Scooter Software

      Comment

      Working...