Kaseya Community

Script to pull data from FTP...

  • Hi, I wanted to see if someone already has a script or can help me create this one i need:

    I need to pull data from a FTP "user & password required" and then drop the data copied to a folder on a group of PC's.

    Thanks !!!

    Legacy Forum Name: Script to pull data from FTP...,
    Legacy Posted By Username: christian@syneteksolutions.com
  • Why not use "Distribute File" in the Kaseya scripts tab? No need to reinvent the wheel.

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: VNET
  • Hi and thanks for your idea VNET...

    But what if the folder where I'm going to place the copied data already contains a file, does "Distribute File" will replace it ??

    Also we need to this automatically at least Once a week, because the ftp files will be updating frequently....

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: christian@syneteksolutions.com
  • Replacing or ignoring and failing, not sure how that would work...... Make a copy of the file you are interested in and try the the Distribute File; see what happens. I guess you would have to manually run the Distribute File script, it doesn't look as though you can schedule that.

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: VNET
  • Distribute file feature constantly ensures that the file on the end computer matches the file on the VSA - so you update the VSA and immediately (within a few mins anyhow) it replaces the ones on the other end. No need to schedule anything.

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: TBK Consulting
  • Yeah... and it shows no mercy too! Even if the user deletes or modifies it, when the PC checks back in with the K server the file that you want there goes right back. This is also a great way to manage a hosts file for very restrictive web filtering.

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: boudj
  • Is there a way to automatically schedule a script to login via username and password to a FTP, then get files from a FTP (let's say weekly) and then distribute them to a number of pc's in a specific path (weekly as well) ?

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: christian@syneteksolutions.com
  • Please i need help with this script....

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: christian@syneteksolutions.com
  • Have you checked out ScriptFTP? http://www.scriptftp.com/

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: CCDave
  • No i have not.. thanks RSQDave, i'm looking at it right now... I'll still wait to see if anyone has implemented a similar script on KASEYA.

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: christian@syneteksolutions.com
  • Use the standard FTP command line in Windows with the -S switch to process a list of FTP commands from a text file.


    See: http://technet2.microsoft.com/WindowsServer/en/library/552ed70a-208d-48c4-8da8-2e27b530eac71033.mspx?mfr=true

    For the FTP sub-commands, see the same link above, but select FTP Sub-Commands.

    See also: http://support.microsoft.com/kb/96269

    Ftp - Transfers files to and from a computer running a File Transfer Protocol (FTP) server service such as Internet Information Services. Ftp can be used interactively or in batch mode by processing ASCII text files.

    Syntax
    ftp [-v] [-d] [-i] [-n] [-g] [-s:FileName] [-a] [-w:WindowSize] [-A] [Host]

    Parameters
    -v - Suppresses the display of FTP server responses.
    -d - Enables debugging, displaying all commands passed between the FTP client and FTP server.
    -i - Disables interactive prompting during multiple file transfers.
    -n - Suppresses the ability to log on automatically when the initial connection is made.
    -g - Disables file name globbing. Glob permits the use of the asterisk (*) and question mark (?) as wildcard characters in local file and path names. For more information, see Related Topics.
    -s: - FileName - Specifies a text file that contains ftp commands. These commands run automatically after ftp starts. This parameter allows no spaces. Use this parameter instead of redirection (
    -a - Specifies that any local interface can be used when binding the FTP data connection.
    -w:WindowSize - Specifies the size of the transfer buffer. The default window size is 4096 bytes.
    -A - Logs onto the FTP server as anonymous.
    Host
    Specifies the computer name, IP address, or IPv6 address of the FTP server to which to connect. The host name or address, if specified, must be the last parameter on the line.
    /? - Displays help at the command prompt.

    Remarks
    • You must prefix ftp parameters with a hyphen (-) rather than a slash (/).

    • Ftp command-line parameters are case-sensitive.

    • This command is available only if the Internet Protocol (TCP/IP) protocol is installed as a component in the properties of a network adapter in Network Connections.

    • Ftp can be used interactively. After it is started, ftp creates a subenvironment in which you can use ftp commands. You can return to the command prompt by typing the quit command. When the ftp subenvironment is running, it is indicated by the ftp > command prompt.

    • For more information about ftp subcommands, see Related Topics.

    • Ftp supports the use of IPv6 when the IPv6 protocol is installed. For more information, see Related Topics.


    Examples
    To log on to the FTP server named ftp.example.microsoft.com, type:

    ftp ftp.example.microsoft.com

    To anonymously log on to the FTP server named ftp.example.microsoft.com, type:

    ftp -A ftp.example.microsoft.com

    To log on to the FTP server named ftp.example.microsoft.com and run the ftp commands contained in a file named Resynch.txt, type:

    Beerftp -s:resynch.txt ftp.example.microsoft.com


    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: pcmnetmanage
  • Whynot use WGET, it is already in kaseya.
    It is used for spybot and has many command line options.

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: pnevola@totalcomputer.com