Fanuc automated backups

  • Hello, what are some of the best ways to automate backups for dozens of Fanuc robots over FTP. The option needs to be free and create new directories on the PC. I currently have a FTP script that backups all the robots but it does not create new directories on the PC with Time & Date stamps. What do you guys recommend for this process?


  • I assume you are programming on a Windows PC. In that case you can go the route of writing a script (Batch, Powershell, Vbscript) or you can write a .NET application (C# or VB). Then you can choose to use the command line FTP script method or the .NET FTPWebRequest method in your script/program. This doesn't require any add on's such as WinSCP.

    For quick and easy I recommend writing a script. Doesn't require any extra software and once you learn how to use it, it won't take long.

  • Yup windows PC. And I have gone the scripting route. When I copy and paste script into CMD prompt it works perfectly. But when I save as a .bat it stops working as soon as I enter the FTP part of the script. What is a good work around for this? My script runs CMD code, then FTP code then CMD code then it is done.

  • You need to use the CMD code to write the FTP script to a text file, then you can call the FTP script. Here is an example:

    echo anon>ftp.txt
    echo bin>>ftp.txt
    echo prompt>>ftp.txt
    echo lcd !myfolder!>>ftp.txt
    echo mget *.*>>ftp.txt
    echo quit>>ftp.txt
    ftp -v -s:ftp.txt !RobotIPaddress!
    del ftp.txt

    The Echo command with the > will write the next bit of text to to the specified text file. > creates the file and >> appends text. Then the ftp -s: command runs the specified text file as an ftp script. Finally I delete the ftp.txt file. The words surrounded by exclamation points ! are variables that get written to the text file as the value. so you can target a different folder and ip address. This way I can generate a unique ftp script each time to target a different local directory and robot IP address.

    I recommend for information on using the ftp and the CMD language.

    Edited once, last by HawkME ().

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account
Sign up for a new account in our community. It's easy!
Register a new account
Sign in
Already have an account? Sign in here.
Sign in Now