Topic "Scripted SFTP fails with Cannot Overwrite Remote File"

Author Message
pixel1138
[View user's profile]

Joined: 2012-11-29
Posts: 2
Location: West Virginia
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
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
Any chance that two instances of the script happen to run at the same time?

If not, please attach complete log file.
pixel1138
[View user's profile]

Joined: 2012-11-29
Posts: 2
Location: West Virginia
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
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
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).
Advertisements

You can post new topics in this forum






Search Site

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!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License