Yes, that's correct.
- martin
Before posting, please read how to report bug or request support effectively.
Bug reports without an attached log file are usually useless.
Set transferOptions = WScript.CreateObject("WinSCP.TransferOptions")
session
and sessionOptions
.
transferOptions
as Dim
.
<job>
<reference object="WinSCP.Session" />
<script language="VBScript">
Dim session, transferOptions, transfer
Set session = WScript.CreateObject("WinSCP.Session")
Script: put -nopermissions -preservetime -transfer="binary" -- "I:\INTERF\SD\PA\*.xml" "/IN/PROD/CustomerInvoice/"
transferOptions
variable – do you at all?
Session.SessionLogPath
. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.Answer: Abort
(ESkipFile) **Upload of file 'XXXX.XML' was successful, but error occurred while setting the permissions and/or timestamp.**
If the problem persists, turn off setting permissions or preserving timestamp. Alternatively you can turn on 'Ignore permission errors' option.
General failure (server should provide error description).
Error code: 4
Error message from server: failed to set attributes: /Home/XXXX.XML
Common reasons for the Error code 4 are:
- Renaming a file to a name of already existing file.
- Creating a directory that already exists.
- Moving a remote file to a different filesystem (HDD).
- Uploading a file to a full filesystem (HDD).
- Exceeding a user disk quota.
Copying finished: Transferred: 6,923,883, Elapsed: 0:03:03, CPS: 37,655/s
Script: Failed
Script: exit
Script: Exit code: 1
Set sessionOptions = WScript.CreateObject("WinSCP.SessionOptions")
With sessionOptions
.Protocol = Protocol_SFtp
.HostName = "xxxx"
.UserName = "xxxx"
.Password = "xxxx"
.SshHostKeyFingerprint = "xxxx"
End With
session.Open sessionOptions
transferOptions.TransferMode = TransferMode_Binary
transferOptions.FilePermissions = Nothing
transferOptions.PreserveTimestamp = False
transferOptions.AddRawSettings "IgnorePermErrors", "1"
transferOptions.filemask = "*.xml"
Set transferResult = session.PutFiles ("D:\HOME\*.xml", "/HOME/", False, transferOptions)
session.Close