Cannot delete files on remote server, custom command works.

Advertisement

aminchar
Joined:
Posts:
3

Cannot delete files on remote server, custom command works.

I can connect, list directory and copy files from server to local fine but cannot delete file(s) on server (or MOVE file from server to local) in GUI or console mode (latter using rm command). Also the -delete command in scripting does not work either for "delete after copy to local". This occurs only with a particular outside/remote server.

However, "custom command" "DELE" does work using the "call" command like:

$winscp>call DELE TheFileName

Version 4.2.3
FTP over SSL
SSL Explicit Encryption
Port 21
Passive Mode

ps: I noticed in the log file that winscp uses full file path to send the DELE command. However that does not work with the call command either! If full file path is not used then "call DELE" does work example:

DELE /inbound/somefile FAILS
DELE somefile WORKS

Note: /inbound is the "Current directory".

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
27,226
Location:
Prague, Czechia

Re: Cannot delete files on remote server, custom command works.

Thanks for your post. This issue is being tracked already.
_________________
Martin Prikryl

Reply with quote

aminchar
Joined:
Posts:
3

Re: Cannot delete files on remote server, custom command works.

Some more contribution to this bug:

The issue appears to be forward slash vs back slash. WinSCP appears to send windows style "Back slash = \" unless explicitly specified in a FullPath in a script.

The server in question appears to be unix server and likes forward slash if FullPath specified. WinSCP by default appears to send FullPath in GUI or console (if FullPath not specified explicity using correct slash). If "call" command is used and fullpath manually specfied using "Forwad Slash = /" then the deletion process works file.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,226
Location:
Prague, Czechia

Re: Cannot delete files on remote server, custom command works.

Can you post a script and associated log file showing when WinSCP sends backslash?
_________________
Martin Prikryl

Reply with quote

Advertisement

You can post new topics in this forum