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

Guest

Re: PUT latest file on sftp site

Please see attached log file
martin

Re: PUT latest file on sftp site

cp713a wrote:

I have exact problem, but i'm not able to use the 'lcd Z:\anotherfolder\upload\'. It says Error changing directory.
Any ideas?

For sure there are more details in the error message (if you are using the latest version of WinSCP).
cp713a

Re: PUT latest file on sftp site

cp713a wrote:

skumarlingam wrote:

It seems its working now. I don't know I didn't modify anything just another day.

Thank you.


I have exact problem, but i'm not able to use the 'lcd Z:\anotherfolder\upload\'. It says Error changing directory.
Any ideas?

Also, did you run this as /script or /command?
cp713a

Re: PUT latest file on sftp site

skumarlingam wrote:

It seems its working now. I don't know I didn't modify anything just another day.

Thank you.


I have exact problem, but i'm not able to use the 'lcd Z:\anotherfolder\upload\'. It says Error changing directory.
Any ideas?
skumarlingam

Re: PUT latest file on sftp site

It seems its working now. I don't know I didn't modify anything just another day.

Thank you.
martin

Re: PUT latest file on sftp site

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

sorry small change in my 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
skumarlingam

PUT latest file on sftp site

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.

# 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.