Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
2k views
in .NET FTP by (240 points)
When trying to delete a directory structure, I receive an exception. The debug info is below. In this case the directory "Test Partner Beta" does exist and is not a file. I am not sure what file the debug info is refering to. Also, does the deleteDirectoryTree method delete all files in the tree or is there a different method I need to call to first delete all the files in the tree and then the directory?

"BUG [FTPControlSocket] 9 Jul 2007 11:02:52.923 : ---> SYST
DEBUG [FTPControlSocket] 9 Jul 2007 11:02:52.923 : 215 Windows_NT version 5.0
DEBUG [FTPFileFactory] 9 Jul 2007 11:02:52.923 : Selected Windows parser
DEBUG [FTPControlSocket] 9 Jul 2007 11:02:52.923 : ---> PWD
DEBUG [FTPControlSocket] 9 Jul 2007 11:02:52.923 : 257 "/" is current directory.
DEBUG [FTPControlSocket] 9 Jul 2007 11:02:52.923 : ---> PASV
DEBUG [FTPControlSocket] 9 Jul 2007 11:02:52.939 : 227 Entering Passive Mode (63,110,64,22,17,134).
DEBUG [FTPControlSocket] 9 Jul 2007 11:02:52.939 : Server supplied address=63.110.64.22
DEBUG [FTPControlSocket] 9 Jul 2007 11:02:52.939 : Server supplied port=4486
DEBUG [FTPControlSocket] 9 Jul 2007 11:02:52.939 : Substituting server supplied IP (63.110.64.22) with remote host IP (63.110.64.22)
DEBUG [ExFTPControlSocket] 9 Jul 2007 11:02:52.939 : NewPassiveDataSocket(63.110.64.22,4486)
DEBUG [ExFTPControlSocket] 9 Jul 2007 11:02:52.939 : Connecting directly to ftp-server 63.110.64.22:4486
DEBUG [ExFTPPassiveDataSocket] 9 Jul 2007 11:02:52.939 : Created passive data-socket: ProxyConnector=
DEBUG [FTPControlSocket] 9 Jul 2007 11:02:52.939 : ---> LIST /csdtest/
DEBUG [FTPControlSocket] 9 Jul 2007 11:02:52.939 : 125 Data connection already open; Transfer starting.
DEBUG [FTPClient] 9 Jul 2007 11:02:52.939 : Reading ASCII listing data
DEBUG [FTPClient] 9 Jul 2007 11:02:52.939 : -->07-09-07 10:40AM <DIR> Test Partner Beta
DEBUG [FTPControlSocket] 9 Jul 2007 11:02:53.111 : 226 Transfer complete.
DEBUG [FTPClient] 9 Jul 2007 11:02:53.111 : Found 1 listing lines
DEBUG [FTPFileFactory] 9 Jul 2007 11:02:53.111 : Parse() called using culture: Invariant Language (Invariant Country)
DEBUG [FTPControlSocket] 9 Jul 2007 11:02:53.111 : ---> CWD /csdtest/
DEBUG [FTPControlSocket] 9 Jul 2007 11:02:53.111 : 250 CWD command successful.
DEBUG [FTPControlSocket] 9 Jul 2007 11:02:53.111 : ---> PWD
DEBUG [FTPControlSocket] 9 Jul 2007 11:02:53.111 : 257 "/csdtest" is current directory.
DEBUG [FTPControlSocket] 9 Jul 2007 11:02:53.111 : ---> PASV
DEBUG [FTPControlSocket] 9 Jul 2007 11:02:53.127 : 227 Entering Passive Mode (63,110,64,22,17,135).
DEBUG [FTPControlSocket] 9 Jul 2007 11:02:53.127 : Server supplied address=63.110.64.22
DEBUG [FTPControlSocket] 9 Jul 2007 11:02:53.127 : Server supplied port=4487
DEBUG [FTPControlSocket] 9 Jul 2007 11:02:53.127 : Substituting server supplied IP (63.110.64.22) with remote host IP (63.110.64.22)
DEBUG [ExFTPControlSocket] 9 Jul 2007 11:02:53.127 : NewPassiveDataSocket(63.110.64.22,4487)
DEBUG [ExFTPControlSocket] 9 Jul 2007 11:02:53.127 : Connecting directly to ftp-server 63.110.64.22:4487
DEBUG [ExFTPPassiveDataSocket] 9 Jul 2007 11:02:53.127 : Created passive data-socket: ProxyConnector=
DEBUG [FTPControlSocket] 9 Jul 2007 11:02:53.127 : ---> LIST Test Partner Beta
DEBUG [FTPControlSocket] 9 Jul 2007 11:02:53.127 : 125 Data connection already open; Transfer starting.
DEBUG [FTPClient] 9 Jul 2007 11:02:53.127 : Reading ASCII listing data
DEBUG [FTPControlSocket] 9 Jul 2007 11:02:53.315 : 550 Test: The system cannot find the file specified.
INFO [FTPControlSocket] 9 Jul 2007 11:02:53.315 : Expected reply codes = [226,250]"



Thanks,

Chuck

1 Answer

0 votes
by (162k points)
The problem is the spaces in the directory name - the server is only reading the first word. You may have to experiment - try putting the name in quotes, or try escaping the spaces.

DeleteDirectoryTree deletes absolutely everything.

Categories

...