Upload new and modified files using FTP

person
Guest

Upload new and modified files using FTP

Hi there, I am new to WinSCP and I was wondering if someone would be able to look at this script and let me know how I could change this to make sure only new/changed files are going through FTP.
option batch off
option confirm off
open [folder:email directory]
option transfer binary
cd /x/y
lcd "C:\Shares\Data\W\X\Y"
get -preservetime *.csv

Disconnect
close
exit

Guest

script update

Alright, thank you for the resource! I referenced it but my script is still not working. It seems to be still pulling all of the files from the source.

Here is what I have now:
option batch off
option confirm off
open [folder:email directory]
option transfer binary cd /x/y lcd "C:\Shares\Data\W\X\Y"
get -preservetime *.csv
put -latest c:\Shares\Data\W\X\* #tried this first but commented it out because it did not work
Disconnect
close
exit
What I feel like I am missing is a correct line for it to update daily and avoid repeated files. I tried to do this with the two put commands but it did not work – it just pulls everything from the source.

martin
To generate the session log file, use /log=C:\path\to\winscp.log command-line argument. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.