Thank you. it worked for me
"put -nopermissions -nopreservetime -resumesupport=off *.xml" ^
Before posting, please read how to report bug or request support effectively.
Bug reports without an attached log file are usually useless.
"put -nopermissions -nopreservetime -resumesupport=off *.xml" ^
TransferOptions.ResumeSupport
is of type TransferResumeSupport
, not TransferResumeSupportState
.
Dim transferOptions As New TransferOptions
transferOptions.ResumeSupport = TransferResumeSupportState.Off
-resumesupport
switch was introduced in 5.2 beta only:
option batch abort
option confirm off
open "sftp://user:password@myhost.us.db.com:0000"
option transfer binary
cd /user/user/outbox/target
lcd "mylocaldirectory"
put -nopermissions -resumesupport=off -nopreservetime *
close
exit
Unknown switch 'resumesupport'.
-nopreservetime
tag. Thanks again for the quick help. You're a rock star!
-nopermissions
and -resumesupport=off
is correct. Just add -nopreservetime
and you should be fine.
WinSCP.com /script=G:\code\Statement_Upload.txt
# Automatically abort script on errors
option batch abort
# Enable overwrite confirmations that conflict with the previous
option confirm on
# Force binary mode transfer
option transfer binary
# Establish the connection to the Statements account
open sftp://user:pass@ftp.site.com:portnumber
# Change the Local Directory
lcd "X:\statements\ToBeSent"
# Change to the correct Remote directory
cd /
# Upload the files ending with .TXT
put -nopermissions -resumesupport=off *.TXT
# Exit
exit
C:\Program Files (x86)\WinSCP>WinSCP.com /script=G:\code\Statement_Upload.txt
batch abort
confirm on
transfer binary
Searching for host...
Connecting to host...
Authenticating...
Using username "user".
Authenticating with pre-entered password.
Authenticated.
Starting the session...
Reading remote directory...
Session started.
Active session: [1] user@ftp.site.com
X:\statements\ToBeSent
/
4061116.TXT | 82 KiB | 20.9 KiB/s | binary | 100%
Upload of file '4061116.TXT' was successful, but error occurred while setting th
e permissions and/or timestamp. If the problem persists, turn on 'Ignore permiss
ion errors' option.
No such file or directory.
Error code: 2
Error message from server (en): File not found
Request code: 9
(A)bort, (R)etry, (S)kip, Ski(p) all: Abort
C:\Program Files (x86)\WinSCP>