Topic "Upload Fails"

Author Message

I am trying to upload a file to a website and keep getting the error:

Error transferring file 'c:\working\access\temp\testWayne.txt'.
Copying files to remote side failed.
Could not create file.

Theile exist. I don't unserstand why it wont upload. I uploads manually, just not with this script.

********** code below ************

Dim Sess As WinSCPnet.Session, SessOpts As SessionOptions, RDI As RemoteDirectoryInfo, TransOpts As TransferOptions, TransRslt As TransferOperationResult, Transac As TransferEventArgs

On Error GoTo ErrorHandler
Set Sess = New Session
Set SessOpts = New SessionOptions
Set TransOpts = New TransferOptions

With SessOpts
.protocol = Protocol_Ftp
.hostname = ""
.UserName = "loginnnnn"
.Password = "pwddddd"
End With

Sess.Open SessOpts
TransOpts.TransferMode = TransferMode_Binary
Set TransRslt = Sess.PutFiles("c:\working\access\temp\testWayne.txt", "/Wayne", True, TransOpts)

TransRslt.Check 'Trigger error if any

For Each Transac In TransRslt.Transfers
Debug.Print Transac.FileName
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 27106
Location: Prague, Czechia
Please attach a full session log file showing the problem (using the latest version of WinSCP).

To generate the session log file, set 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.

You can post new topics in this forum


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!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License