Uploading Invite Files to FTP

LiveSurvey provides an FTP upload destination for invite files. Each client gets one account on our FTP server to upload into. LiveSurvey checks for new invite files on our FTP server once every five minutes.

A LiveSurvey representative will email you your FTP credentials you are ready to move forward with FTP. Note that uploading to an FTP destination should be the last step in invite file automation; invite files should be checked for validity and tested using the LiveSurvey Portal's validator when possible.

Uploading to FTP Automatically

There are many ways to upload to an FTP destination programmatically; there is no one prescribed way to do so.

For those using Microsoft Windows, a good option to upload is to use WinSCP. WinSCP is a free and widely used FTP client that offers a scripting interface for the Windows command line, PowerShell, and C#. By using the PowerShell Module Wrapper for WinSCP found on Microsoft's PowerShell Gallery, uploading to an FTP destination is very easy.

The following is an example script using the WinSCP PowerShell module to upload a file:

# To use this module, install the PowerShell Module Wrapper for WinSCP.
# It can be installed through Microsoft's PowerShell Gallery
# at https://www.powershellgallery.com/packages/WinSCP/5.9.2.5
Import-Module -Name WinSCP

$hn = "hostname.com"
$un = "username"
$pw = ConvertTo-SecureString "password" -AsPlainText -Force
$cred = New-Object System.Management.Automation.PSCredential ($un, $pw)
$path = "C:\path\to\invites.csv"

New-WinSCPSession -Hostname $hn -Credential $cred `
    | Send-WinSCPItem -Path $path -Destination "/"

More documentation on the WinSCP PowerShell module can be found on its website and on the WinSCP website.