Topic "Deleting filenames with leading spaces"

Author Message
Greg
[View user's profile]

Joined: 2007-10-04
Posts: 11
Against a Windows server (not tried on UNIX), WinSCP cannot delete a file that has a leading space. When attempting to delete " readme.txt", WinSCP errors with:
Code:
/path/to/directory/readme.txt: The system cannot find the file specified.
- i.e. it loses the leading space.

Greg
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
Can you post a full error message? Also what protocol are you using?
_________________
Martin Prikryl
Greg
[View user's profile]

Joined: 2007-10-04
Posts: 11
prikryl wrote:
Can you post a full error message? Also what protocol are you using?


Sory; I should have said. I'm using FTP. The relevant bits of the log are below - you can see that the leading space is being sent from server to client, but not from client to server on the delete ...

Code:

. 2007-10-12 15:08:11.916 Connecting to ****...
. 2007-10-12 15:08:11.931 FtpControlSocket.cpp(1056): OnConnect(0)  OpMode=1 OpState=-1   caller=0x01d2684c
. 2007-10-12 15:08:11.931 Connected with ****. Waiting for welcome message...
. 2007-10-12 15:08:11.947 FtpControlSocket.cpp(878): OnReceive(0)  OpMode=1 OpState=-1   caller=0x01d2684c
< 2007-10-12 15:08:11.947 220-Microsoft FTP Service
. 2007-10-12 15:08:12.103 FtpControlSocket.cpp(878): OnReceive(0)  OpMode=1 OpState=-1   caller=0x01d2684c
< 2007-10-12 15:08:12.103     Welcome.
< 2007-10-12 15:08:12.103 220 Byw329a002
> 2007-10-12 15:08:12.103 USER ************
. 2007-10-12 15:08:12.119 FtpControlSocket.cpp(878): OnReceive(0)  OpMode=1 OpState=0   caller=0x01d2684c
< 2007-10-12 15:08:12.119 331 Password required for ************.
> 2007-10-12 15:08:12.119 PASS ************
. 2007-10-12 15:08:12.447 FtpControlSocket.cpp(878): OnReceive(0)  OpMode=1 OpState=3   caller=0x01d2684c
< 2007-10-12 15:08:12.447 230 User ************ logged in.
> 2007-10-12 15:08:12.447 SYST
. 2007-10-12 15:08:12.463 FtpControlSocket.cpp(878): OnReceive(0)  OpMode=1 OpState=-14   caller=0x01d2684c
< 2007-10-12 15:08:12.463 215 Windows_NT
> 2007-10-12 15:08:12.463 FEAT
. 2007-10-12 15:08:12.478 FtpControlSocket.cpp(878): OnReceive(0)  OpMode=1 OpState=-13   caller=0x01d2684c
< 2007-10-12 15:08:12.478 211-FEAT
. 2007-10-12 15:08:12.603 FtpControlSocket.cpp(878): OnReceive(0)  OpMode=1 OpState=-13   caller=0x01d2684c
< 2007-10-12 15:08:12.603     SIZE
< 2007-10-12 15:08:12.603     MDTM
< 2007-10-12 15:08:12.603 211 END
. 2007-10-12 15:08:12.603 Connected
. 2007-10-12 15:08:12.603 FtpControlSocket.cpp(4180): ResetOperation(1)  OpMode=1 OpState=-13   caller=0x01d2684c
. 2007-10-12 15:08:12.603 Got reply 1 to the command 1
. 2007-10-12 15:08:12.603 --------------------------------------------------------------------------
. 2007-10-12 15:08:12.603 Using FTP protocol.


Code:

. 2007-10-12 15:08:22.743 Changing directory to "ajax".
. 2007-10-12 15:08:22.743 FtpControlSocket.cpp(1269): FtpCommand(CWD ajax)  OpMode=0 OpState=-1   caller=0x01d2684c
> 2007-10-12 15:08:22.743 CWD ajax
. 2007-10-12 15:08:22.947 FtpControlSocket.cpp(878): OnReceive(0)  OpMode=2 OpState=-1   caller=0x01d2684c
< 2007-10-12 15:08:22.947 250 CWD command successful.
. 2007-10-12 15:08:22.947 FtpControlSocket.cpp(4180): ResetOperation(1)  OpMode=2 OpState=-1   caller=0x01d2684c
. 2007-10-12 15:08:22.947 Got reply 1 to the command 16
. 2007-10-12 15:08:22.947 Getting current directory name.
. 2007-10-12 15:08:22.947 FtpControlSocket.cpp(1269): FtpCommand(PWD)  OpMode=0 OpState=-1   caller=0x01d2684c
> 2007-10-12 15:08:22.947 PWD
. 2007-10-12 15:08:22.962 FtpControlSocket.cpp(878): OnReceive(0)  OpMode=2 OpState=-1   caller=0x01d2684c
< 2007-10-12 15:08:22.962 257 "/************/backup-2007-04-17/ajax" is current directory.
. 2007-10-12 15:08:22.962 FtpControlSocket.cpp(4180): ResetOperation(1)  OpMode=2 OpState=-1   caller=0x01d2684c
. 2007-10-12 15:08:22.962 Got reply 1 to the command 16
. 2007-10-12 15:08:22.962 FtpControlSocket.cpp(1276): List(FALSE,0,"/************/backup-2007-04-17/ajax/","",1)  OpMode=0 OpState=-1   caller=0x01d2684c
. 2007-10-12 15:08:22.962 Retrieving directory listing...
> 2007-10-12 15:08:22.962 TYPE A
. 2007-10-12 15:08:22.978 FtpControlSocket.cpp(878): OnReceive(0)  OpMode=4 OpState=8   caller=0x01d2684c
< 2007-10-12 15:08:22.978 200 Type set to A.
. 2007-10-12 15:08:22.978 FtpControlSocket.cpp(1276): List(FALSE,0,"","",0)  OpMode=4 OpState=8   caller=0x01d2684c
> 2007-10-12 15:08:22.978 PORT 10,215,156,222,11,130
. 2007-10-12 15:08:23.009 FtpControlSocket.cpp(878): OnReceive(0)  OpMode=4 OpState=7   caller=0x01d2684c
< 2007-10-12 15:08:23.009 200 PORT command successful.
. 2007-10-12 15:08:23.009 FtpControlSocket.cpp(1276): List(FALSE,0,"","",0)  OpMode=4 OpState=7   caller=0x01d2684c
. 2007-10-12 15:08:23.009 TransferSocket.cpp(597): SetActive()   caller=0x01d85358
> 2007-10-12 15:08:23.009 LIST -a
. 2007-10-12 15:08:23.025 FtpControlSocket.cpp(878): OnReceive(0)  OpMode=4 OpState=9   caller=0x01d2684c
< 2007-10-12 15:08:23.025 150 Opening ASCII mode data connection for /bin/ls.
. 2007-10-12 15:08:23.025 FtpControlSocket.cpp(1276): List(FALSE,0,"","",0)  OpMode=4 OpState=9   caller=0x01d2684c
. 2007-10-12 15:08:23.040 TransferSocket.cpp(418): OnAccept(0)   caller=0x01d85358
. 2007-10-12 15:08:23.072 TransferSocket.cpp(557): OnClose(0)   caller=0x01d85358
. 2007-10-12 15:08:23.072 TransferSocket.cpp(1179): Close()   caller=0x01d85358
. 2007-10-12 15:08:23.072 TransferSocket.cpp(1179): Close()   caller=0x01d85358
. 2007-10-12 15:08:23.072 FtpControlSocket.cpp(2070): TransferEnd(4)  OpMode=4 OpState=10   caller=0x01d2684c
. 2007-10-12 15:08:23.072 FtpControlSocket.cpp(1276): List(TRUE,0,"","",0)  OpMode=4 OpState=10   caller=0x01d2684c
. 2007-10-12 15:08:23.072 07-07-06  04:00PM                  215  readme.txt
. 2007-10-12 15:08:23.072 10-12-07  03:05PM                    5 text.txt
. 2007-10-12 15:08:23.072 TransferSocket.cpp(108): ~CTransferSocket()   caller=0x01d85358
. 2007-10-12 15:08:23.072 TransferSocket.cpp(1179): Close()   caller=0x01d85358
. 2007-10-12 15:08:23.165 FtpControlSocket.cpp(878): OnReceive(0)  OpMode=4 OpState=10   caller=0x01d2684c
< 2007-10-12 15:08:23.165 226 Transfer complete.
. 2007-10-12 15:08:23.165 FtpControlSocket.cpp(1276): List(FALSE,0,"","",0)  OpMode=4 OpState=10   caller=0x01d2684c
. 2007-10-12 15:08:23.165 Directory listing successful
. 2007-10-12 15:08:23.165 FtpControlSocket.cpp(4180): ResetOperation(1)  OpMode=4 OpState=10   caller=0x01d2684c
. 2007-10-12 15:08:23.165 Got reply 1 to the command 2
. 2007-10-12 15:08:23.197 Session upkeep
. 2007-10-12 15:08:23.431 Session upkeep
. 2007-10-12 15:08:23.931 Session upkeep
. 2007-10-12 15:08:24.431 Session upkeep
. 2007-10-12 15:08:24.931 Session upkeep
. 2007-10-12 15:08:25.431 Session upkeep
. 2007-10-12 15:08:25.931 Session upkeep
. 2007-10-12 15:08:26.431 Session upkeep
. 2007-10-12 15:08:26.587 Deleting file "readme.txt".
. 2007-10-12 15:08:26.587 FtpControlSocket.cpp(4356): Delete("readme.txt", "/802938884/development/webappsdev-resourcing/backup-2007-04-17/ajax/")  OpMode=0 OpState=-1   caller=0x01d2684c
> 2007-10-12 15:08:26.587 DELE /802938884/development/webappsdev-resourcing/backup-2007-04-17/ajax/readme.txt
. 2007-10-12 15:08:26.618 FtpControlSocket.cpp(878): OnReceive(0)  OpMode=256 OpState=-1   caller=0x01d2684c
< 2007-10-12 15:08:26.618 550 /802938884/development/webappsdev-resourcing/backup-2007-04-17/ajax/readme.txt: The system cannot find the file specified.
. 2007-10-12 15:08:26.618 FtpControlSocket.cpp(4356): Delete("", "")  OpMode=256 OpState=-1   caller=0x01d2684c
. 2007-10-12 15:08:26.618 FtpControlSocket.cpp(4180): ResetOperation(1)  OpMode=256 OpState=-1   caller=0x01d2684c
. 2007-10-12 15:08:26.618 Got reply 1 to the command 32
. 2007-10-12 15:08:26.618 Asking user:
. 2007-10-12 15:08:26.618 Error deleting file 'readme.txt'. ("/802938884/development/webappsdev-resourcing/backup-2007-04-17/ajax/readme.txt: The system cannot find the file specified. ")
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
OK thanks I'll check that.
_________________
Martin Prikryl
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
The problem is inherited from FileZilla project (on which the FTP code of WinSCP is based). I'm not experienced with the FileZilla code enough to fix that ATM.
_________________
Martin Prikryl
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
This issue has been added to tracker.
_________________
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