Kaseya Community

How to copy 60 MB folder from an FTP site?

  • I'd like to copy a 60 MB folder from our company's FTP site to remote laptops in the field. The folder on the FTP server is open with no logons. I've tried "Get File" and my own scripts without success.
    Can this be done or do I have to first put it on the Kaseya server and then "Distribute File" from there?
    Thank you. Rich

    Legacy Forum Name: How to copy 60 MB folder from an FTP site?,
    Legacy Posted By Username: rgood
  • I would zip the folder and use the "Get URL" command.

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: cnwicsurrett
  • Thanks. I'll Try it.

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: rgood
  • No joy. Can anyone tell me what is wrong with this script? I'm trying to copy a folder from an FTP site to the Agent Temp directory. (The name of the company has been changed for this post.) It returns a "Success THEN" almost immediately but nothing is copied.
    I appreciate your help.

    Script Name: Test Get URL - Folder
    Script Description: Copies a folder from FTP site to Agent Temp directory.

    IF True
    THEN
    Get Variable
    Parameter 1 : 10
    Parameter 2 :
    Parameter 3 : agenttemp
    OS Type : 0
    Get Variable
    Parameter 1 : 6
    Parameter 2 :
    Parameter 3 : agentid
    OS Type : 0
    Get URL
    Parameter 1 : ftp://ftp..com/For_Field_Staff_Only/Kas/Packages/exec.zip
    Parameter 2 : #agenttemp#
    Parameter 3 : 3
    OS Type : 0
    ELSE

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: rgood
  • Parameter 2 on the Get URL command is missing the file name. Try this script and let me know how it works out.

    Script Name: Test Get URL - Folder
    Script Description: Copies a folder from FTP site to Agent Temp directory.

    IF True
    THEN
    Get URL
    Parameter 1 : ftp://ftp..com/For_Field_Staff_Only/Kas/Packages/exec.zip
    Parameter 2 : #vAgentConfiguration.agentTempDir#\exec.zip
    Parameter 3 : 3
    OS Type : 0
    ELSE

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: cnwicsurrett
  • Thanks Carlie. That was the problem and it works now.
    Sheesh! Us newbies would be learning the hard way if it weren't for the help from you experienced guys. We are grateful!

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: rgood
  • No problem, glad I could help.

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: cnwicsurrett
  • I was reading the forums the other day, and ran across a post about using the Microsoft BITS service for transferring files. This might be particularly helpful for laptop users, as they are often connecting/disconnecting from networks frequently...



    http://community.kaseya.com/xsp/f/28/t/6153.aspx



    Reid Johnston

    TechGen Consulting, Inc.

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: reidjohnston
  • I assume Kaseay can call a batch command?

    Assuming so, just use these teo files to get the job done, tada! Who said that batch and FTp had no place in today's environment!? haha!

    RUNFTP.Bat Calls FTP to use a script which you have generated. You could of course shorten this to be a single line command to call the FTP script and forgo the RUNFTP.Bat altogether if Kaseya will run a native command instead of a batch file (obviously).

    --------------------------------------------------------------------
    ((RUNFTP.Bat))
    --------------------------------------------------------------------
    :Begin
    Set TPath=[Your Path to FTP Script]
    Set LPath=[Your Path to Log for script]
    :RUN-FTP
    ftp -s:"%TPath%\FTPTempScript2.txt" > "%LPath%\LAST_FTP.txt"
    :End

    --------------------------------------------------------------------


    --------------------------------------------------------------------
    ((FTPTempScript2.txt))
    --------------------------------------------------------------------
    open [IP of FTP Server]
    [Login Name]
    [Login PW]
    cd [Your Path]
    binary
    get [Remote File Name]
    put [Local File Name and path]
    bye

    --------------------------------------------------------------------


    -Q

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: QSquared