Automate an sftp file transfer

Posted on 2012-08-20
Last Modified: 2012-08-21

I am looking to have a vbscript file scan a folder on a sftp server and if there are files in the directory, move those files to a local folder.  I know there is software out there that can do this, but most are very expensive and have more functions than needed.

Thank you.
Question by:cbones
    LVL 51

    Assisted Solution

    by:Bill Prew
    Wouldn't you just use an FTP client, and try to copy via MGET all files in the folder to be checked, into a local folder?  If there are no files then nothing will be transferred.  Not sure I see the need for a VBS script, something like WinSCP or Putty could do this all by itself.

    LVL 16

    Accepted Solution

    There is no native SFTP support in VBScript.

    When you say "move" do you intend to both download a copy of the file and also delete it from the server?  

    If you do need to delete files after downloading them make sure whatever solution you choose is smart enough to NOT delete the source file if the download fails.

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Join & Write a Comment

    Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
    Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now