Topic "$session.SynchronizeDirectories left file.filepart and file and throws the error"

Author Message
Mohan Anandan

Guest


While doing the $session.SynchronizeDirectories operation, it seems at times the target directory consists of the file name as well as filename.filepart files.
And WinSCP is trying to rename the .filepart to original file and complains that the file already exists, Error code:4.

Any idea, why it is creating the filename and .filepart together? ideally .filepart would be the first. It does every time though but at times i see this case.

Because of this error, it doesn't synchronize any new files present in the source directory. I used $synchronizationResult.Check()

PS: The user does not have overwrite permission on the target directory and therefore the Error Code:4 has been thrown.

Any advice on this? Thanks.
WinSCP_scenario.JPG (17.81 KB)

Description: File and File part, screen shot from WinSCP GUI.

WinSCP_scenario.JPG

Advertisements
martin◆
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 27059
Location: Prague, Czechia
Mohan Anandan wrote:
Any idea, why it is creating the filename and .filepart together?

I do not think that WinSCP ever does that.

Please attach a full session log file showing the problem (using the latest version of WinSCP).

To generate the session log file, enable logging, log in to your server and do the operation and only the operation that causes the error. 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.
Mohan Anandan

Guest


Unfortunately, I didn't enable the session logs during the activity. Like I said, its not happening all the times and hard to reproduce.

Other thing about using $synchronizationResult.Check(), it doesn't proceed to sync other new files if there are any (above said)conflicts exists? Just exits with exception unless some one cleans the files at sftp server.

Given that script is going to run on a un-monitored system, how to get all the new files into SFTP server even though there are some conflicts / exception with previous session exists?

Thanks.
martin◆
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 27059
Location: Prague, Czechia
Mohan Anandan wrote:
Other thing about using $synchronizationResult.Check(), it doesn't proceed to sync other new files if there are any (above said)conflicts exists? Just exits with exception unless some one cleans the files at sftp server.

Given that script is going to run on a un-monitored system, how to get all the new files into SFTP server even though there are some conflicts / exception with previous session exists?

It's not possible currently with Session.SynchronizeDirectories. It always stops on the first error.
Advertisements

You can post new topics in this forum

Search

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