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

In 2010, there was indeed no -resumesupport switch.

If you still have problems, please post session log file.
fmrock

I did try -resumesupport=off and -resumesupport=2, but neither did work

I noticed his bat file was pointing to the E drive.
e:\winscp\winscp.com  /script=e:\winscp\FTP.txt

the file winscp.com was from 2010
I updated the bat file to point to the installed version and was from 2022
"C:\Program Files (x86)\WinSCP\WinSCP.com"  /script=e:\winscp\FTP.txt

I will have a new file to test with tomorrow to see if the bat file update worked.
fmrock

ResumeSupport

I have taken over a process that another co-worker was doing manually FTP a file twice a week.
He had a script made, however, because the receiving server takes the file as soon as it's placed, the script would fail.

I have figured out if I modify the winscp.ini file to ResumeSupport=2 my script works fine. However we have other automated scripts that I don't want to leave this set to 2. I have tried to add -resumesupport=off but just get an invalid switch error. Is there a correct way to update this script to set resumesupport off?
option batch on
option confirm off
open sftp://username:password@ftp.URL.com -hostkey="ssh-rsa 1024 11:aa:22:cc:33:aa:aa:aa:aa:aa:aa:aa:aa:aa:aa:aa"
option transfer binary
put E:\Test\Test.csv /prod/*.* -nopermissions -nopreservetime 
close
exit