Topic "SFTP command line to only copy updated files"

Author Message
Welshhop
[View user's profile]

Joined: 2014-03-31
Posts: 6
Location: UK
Hi, i have the following command line which copies everything from an SFTP folder to my local folder.
cd c:\Program Files (x86)\winscp
winscp.exe /console /Command "option batch abort" "option confirm off" "open sftp://User:PW@IP:PORT/" "cd /QlikView/Compliance/" "option transfer binary" "get *.* C:\VeoliaData\Compliance\" "close" "Exit" /log="C:\veoliadata\FTP_Transfer.log"

What changes do i need to make for it to only copy files that have been modified?

Thanks
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24994
Location: Prague, Czechia
Use -neweronly switch of get command (in 5.6 beta only):
https://winscp.net/eng/docs/scriptcommand_get

Or use synchronize local:
https://winscp.net/eng/docs/scriptcommand_synchronize
_________________
Martin Prikryl
Prashanth

Guest


prikryl wrote:
Use -neweronly switch of get command (in 5.6 beta only):
https://winscp.net/eng/docs/scriptcommand_get

Or use synchronize local:
https://winscp.net/eng/docs/scriptcommand_synchronize



How to use and pass the "neweronly" parameter into the script

Regards,
Prashanth
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24994
Location: Prague, Czechia
Prashanth wrote:
How to use and pass the "neweronly" parameter into the script

Like get -neweronly ....
_________________
Martin Prikryl
Prashanth

Guest


Does newonly OR FILEMASK scans thru subfolder on remote site?

prikryl wrote:
Prashanth wrote:
How to use and pass the "neweronly" parameter into the script

Like get -neweronly ....
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24994
Location: Prague, Czechia
Prashanth wrote:
Does newonly OR FILEMASK scans thru subfolder on remote site?

Yes they do.
_________________
Martin Prikryl
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License