Topic "sync to ftp site does not delete destination directory"

Author Message
pagnin
[View user's profile]

Joined: 2009-11-05
Posts: 4
Location: Italia
using winscp version 4.2.4 build 610
origin OS: windows 2003 SP2
destination ftp server: windows 2000 and IIS ftp server
using scripting automation

error message:

> 2009-11-05 17.01.04.666 CWD /test/directory/
< 2009-11-05 17.01.04.666 250 CWD command successful.

....

> 2009-11-05 17.01.04.853 RMD /test/directory/
< 2009-11-05 17.01.04.853 550 /test/directory: Impossibile accedere al file. Il file utilizzato da un altro processo.
. 2009-11-05 17.01.04.853 Asking user:
. 2009-11-05 17.01.04.853 Error deleting file '\test\directory'. ("/test/directory: Impossibile accedere al file. Il file utilizzato da un altro processo. ")
. 2009-11-05 17.01.04.853 Disconnected from server

this happen during the execution of the command:

synchronize remote -mirror -delete c:\test\directory /test/directory

it seems that windows 2000 server and IIS does not allow to delete the directory if the directory is still in use by a user process.

This lock happen every time because it is winscp that does the CWD command to the directory it has to delete and does not change the directory before trying to delete it.

In fact, issuing the RMD command after winscp has run, with the exact same directory does delete the directory correctly.

Let me know If you need more info.
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
Please post a full log file showing the problem.

To generate log file, enable logging, log in to your server and do the operation and only the operation that causes the error. For posting extensive logs you may use pastebin or similar application. 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 may email it to me. You will find my address (if you log in) in my forum profile. Please include link back to this topic in your email. Also note in this topic that you have emailed the log.
_________________
Martin Prikryl
pagnin
[View user's profile]

Joined: 2009-11-05
Posts: 4
Location: Italia
I've sent the full log.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
I didn't get it. Can you try again?
_________________
Martin Prikryl
pagnin
[View user's profile]

Joined: 2009-11-05
Posts: 4
Location: Italia
Yes. I have resent the log, this time I have compressed it in a zip file, may be 380Kb where too much? (the previous mail was still in the delivery queue with a 45X error).

I have monitored the new mail and it has been delivered to the destination mail host, so you should get it, this time.

Regards
pagnin
[View user's profile]

Joined: 2009-11-05
Posts: 4
Location: Italia
>
> From the log it looks like you have used \test\directory as remote directory path instead of /test/directory.
> Is it correct? Can you try it with /test/directory?

I have tried and effectively it works.

why the different behavior, if I can ask?
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
pagnin wrote:
I have tried and effectively it works.

why the different behavior, if I can ask?

Before deleting remote directory, WinSCP checks if the current working directory is below the deleted one. If it is, it moves away from it. WinSCP thinks it is deleting \test\test\test and the current directory is /test/test/test, which for WinSCP is different directory. So it does not move out. The problem here is that your server does not care about which slashes are used. Normally if you tell regular *nix server to go to \test\test\test, it would fail. Your server does not, instead it goes to /test/test/test.
_________________
Martin Prikryl
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