Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: Scripting FTP for new/modified files to go from remote server to local server.

The synchronize command takes directory path only, so no *:
synchronize local -filemask="*>=1D" c:\hares\Data\W\9AR
securitym4n

Scripting FTP for new/modified files to go from remote server to local server.

Hi all, I have been working on this script to try to get new files or changed files from an email directory and upload them to a database server. I have been trying to do this with both scripting and PowerShell code but I haven't been successful yet. Here is what I have for the script:

# Automatically answer all prompts negatively not to stall
# the script on errors
option batch off
 
# Disable overwrite confirmations that conflict with the previous
option confirm off
 
open usr:pass@ftp.domain.com
 
# If you need to change directory eg..(cd /cme/ftp/940/Outgoing)
cd /futr/9AR
 
lcd "C:\Shares\Data\W\9AR\"
 
synchronize local -preservetime *.csv
 
synchronize local -filemask="*>=1D" c:\hares\Data\W\9AR\*
synchronize local "C:\Shares\Data\W\9AR\" "/futr"
 
Disconnect
close
exit

This is the error it gives me: