No announcement yet.

FTP Script on bc3

  • Time
  • Show
Clear All
new posts

  • FTP Script on bc3

    I need to create a script in order to compare 2 folders , from which the one is locally on my computer and the other is on the providers server because we are talking about a site. I need to find the differences between the two folders and then copy the new files from the local folder to the remote.

    Then I need a backup script too...

    Can someone help me because I have no idea how to create a script?
    Thank you in advance..

  • #2
    Example of FTP Scrpit

    Hey Vasso,

    Here's the one we use:
    ================================================== ======

    # Turn logging on
    log normal "C:\Backup.txt"

    # Load the base folders

    #Make the target identical to the source
    #includes deleting files that only exist on the target side
    option confirm:yes-to-all
    sync mirror:lt->rt

    ================================================== =====
    You'll have to replace everything in CAPS with your info.

    This take everything from the server and backs it up to our local. Switch lt->rt to rt->lt if you want it to go the other way (local pushed up over FTP).

    Also, this creates a log in the c drive as stated in the first line so change that if you want the log someone else.

    Then just create a batch file with this text:

    "C:\Program Files\Beyond Compare 3\BCompare.exe" @C:\backupServer.txt

    where C:\backupServer.txt is the name of the script that contains the text up top.

    If you're having trouble with FTP authentication you can change settings like Passive and Active by opening Beyond Compare's standard app and going to Tools->FTP Profiles. Just make changes to the default one and the script should pick them up (unless you have a profile for the user you change the text to above).

    Hope that helps.