Command line for file comparison and upload

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gurka
    New User
    • Nov 2012
    • 1

    Command line for file comparison and upload

    Hello!
    I am new to BeyondCompare and try to understand whether I can do the following :

    I need to compare two files, one on a local computer, another on internet server. If the remote file has different size or timestamp, it has to be replaced by the local one. If the remote file does not exists - the local file has to be uploaded on internet server.
    The task is automatic, from a database Access 2010 + VBA. I can start BCompare.exe using Shell, but I did not find how to retrieve comparison results.

    Any help would be greatly appreciated.
  • Aaron
    Team Scooter
    • Oct 2007
    • 15997

    #2
    Hello,

    We can do one of two things automatically:

    1) Run a command line with /qc which returns the comparison results (equal, different, etc) as an %errorlevel%
    This is documented in the Help file -> Command Line Reference

    2) Run a script which will sync files from one side to the other. The script wouldn't return the results of the file, but would use BC3 itself in an automated mode to perform the copy from one side to the other. Script could also return a Report, similar to the graphical interface's Session menu -> Folder Compare Report, but this would need to be parsed to determine results.
    This is documented in the Help file -> Using Beyond Compare -> Automating with Script.


    Which strategy would you like to pursue?
    Aaron P Scooter Software

    Comment

    Working...