Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

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

I have checked the logs. But there's nothing I can help you with. It's the server who's failing to open the file (Error message from server: Failed to open local file).
pixel1138

No, it runs hourly, and the files are not that large, plus the timeout on the server is not set high enough to cause an overlap from the previous instance. I'll email you the logs. Thank you.
martin

Re: Scripted SFTP fails with Cannot Overwrite Remote File

Any chance that two instances of the script happen to run at the same time?

If not, please attach complete log file.
pixel1138

Scripted SFTP fails with Cannot Overwrite Remote File

WinSCP version: 5.1.0
Windows version: Windows XP SP3
SFTP protocol version: SFTP-4
SFTP Server: WS_FTP 7.5.1.2
Authentication: Both key and password

Error Message: Cannot overwrite remote file '/users/home/generic_filename.pdf.filepart'.

Press 'Delete' to delete the file and create new one instead of overwriting it.
General failure (server should provide error description).
Error code: 4
Error message from server: Failed to open local file
Request code: 3

I have a VBScript that runs every hour and uploads pdf files. 80% of the time, it works with no problems. The rest of the time it fails on a random one of the files with the above error message. After that happens, the script will not upload any more files behind the failed file until the .filepart of the offending file is deleted on the server.

The command line used: winscp.exe /script="upload.txt" /log="log.xml"
Upload.txt reads:
option batch abort
option confirm off
open username@ftp.example.com
put C:\Local_Directory\*.pdf /users/home/ -delete -nopreservetime
exit

I have had WS_FTP Support look at the server side of the transfer and they say it rests on the client side. I am at a loss as to the cause considering that it doesn't always happen. Plus, I've never been able to recreate the error when using the GUI. Any help would be appreciated, and I can provide the xml log generated from the script, as well as the server log. I can't post them here, but I would be more than happy to email them to you.

Thank you