Topic "PUT latest file on sftp site"

Author Message
skumarlingam
[View user's profile]

Joined: 2016-10-12
Posts: 5
Location: NC
Hello experts,

Please let me know where went wrong in below code.

I am trying to upload only latest file out of all .bkp files. Each .bkp file generates every 15 minutes. I need to pickup latest .bkp file from list of files.

Code:
# Connect to SFTP server using a password
open sftp://wonder:Password;fingerprint=ssh-dss-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00@ftp.xyz.com/test/uploadfilehere/
# Upload file
lcd D:\Shares\takefilefromhere\
put *.bkp /test/uploadfilehere/ latest -nopreservetime
exit


Thank you in advance.
Advertisements
skumarlingam
[View user's profile]

Joined: 2016-10-12
Posts: 5
Location: NC
sorry small change in my code

Code:
# Connect to SFTP server using a password
open sftp://wonder:Password;fingerprint=ssh-dss-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00@ftp.xyz.com/test/uploadfilehere/
# Upload file
lcd D:\Shares\takefilefromhere\
put *.bkp /test/uploadfilehere/ -latest -nopreservetime
exit
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26331
Location: Prague, Czechia
The code looks good. If it does not do what you want, you have to tell us what it does and what you expected different. Also, attach a log file.
skumarlingam
[View user's profile]

Joined: 2016-10-12
Posts: 5
Location: NC
It seems its working now. I don't know I didn't modify anything just another day.

Thank you.
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