Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
4.4k views
in .NET FTP by (1.4k points)
I use PRO version in a .NET environment.

I download the file from the server, then delete the file on the server if trsnfer was successful This works just fine for all files. However, our users tend to put .... (periods) in their filenames on occasion, so the DownloadFile works fine and does the transfer OK, but fails the delete or rename.

When doing (binary transfer) an ftp.DeleteFile OR ftpFileRrename (u_TESTFILE_060507082003_....ordersfile_6_5_2007_81743_xx_xxxx_xxxx.xls) it fails with rename or delete error.

The file can be deleted on the server using the standard MS delete in Explorer.
Removing the 4 periods in the middile of the filename corrects the problem and the transfer/delete or rename works without error.


:?:

6 Answers

0 votes
by (162k points)
Can you enable Debug level of logging and post a snippet that shows a delete or rename being tried? See the help for enabling logging.
0 votes
by (1.4k points)
Here is snippet. I tried to delete using the remotefilelist component which gives same error as my windows service.

DEBUG [AsyncProcessor] 8 Jun 2007 08:10:28.705 : Queuing FTP task DeleteFile(String="u_TESTFILE_060507082003_...ordersfile_6_5_2007_81743_am_wsfs_kpre.xls")
DEBUG [AsyncProcessor] 8 Jun 2007 08:10:28.705 : Starting FTP task processor
DEBUG [AsyncProcessor] 8 Jun 2007 08:10:28.705 : Running FTP task DeleteFile(String="u_TESTFILE_060507082003_...ordersfile_6_5_2007_81743_am_wsfs_kpre.xls")
DEBUG [AsyncTask] 8 Jun 2007 08:10:28.705 : Running task: DeleteFile(String="u_TESTFILE_060507082003_...ordersfile_6_5_2007_81743_am_wsfs_kpre.xls")
DEBUG [FTPControlSocket] 8 Jun 2007 08:10:28.705 : ---> DELE u_TESTFILE_060507082003_...ordersfile_6_5_2007_81743_am_wsfs_kpre.xls
DEBUG [FTPControlSocket] 8 Jun 2007 08:10:28.736 : 550 deletion failed
INFO [FTPControlSocket] 8 Jun 2007 08:10:28.736 : Expected reply codes = [200,250]
DEBUG [EnterpriseDT.Net.Ftp.ExFTPConnection] 8 Jun 2007 08:10:28.783 : Drilling into System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
ERROR [EnterpriseDT.Net.Ftp.ExFTPConnection] 8 Jun 2007 08:10:28.783 : Error event while executing DeleteFile - notifying Error event-handlers
ERROR [EnterpriseDT.Net.Ftp.ExFTPConnection] 8 Jun 2007 08:10:28.799 : Event-handlers notified successfully
DEBUG [AsyncTask] 8 Jun 2007 08:10:28.799 : Notifying of task completion: DeleteFile(String="u_TESTFILE_060507082003_...ordersfile_6_5_2007_81743_am_wsfs_kpre.xls")
DEBUG [AsyncTask] 8 Jun 2007 08:10:28.799 : Task completion notified: DeleteFile(String="u_TESTFILE_060507082003_...ordersfile_6_5_2007_81743_am_wsfs_kpre.xls")
DEBUG [AsyncProcessor] 8 Jun 2007 08:10:28.908 : FTP task completed DeleteFile(String="u_TESTFILE_060507082003_...ordersfile_6_5_2007_81743_am_wsfs_kpre.xls")
DEBUG [AsyncProcessor] 8 Jun 2007 08:10:28.908 : FTP task completed DeleteFile(String="u_TESTFILE_060507082003_...ordersfile_6_5_2007_81743_am_wsfs_kpre.xls")
of an invocation.
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
at EnterpriseDT.Net.Ftp.ExFTPConnection.a.a()
at EnterpriseDT.Net.Ftp.ExFTPConnection.EndDeleteFile(IAsyncResult asyncResult)
at EnterpriseDT.Net.Ftp.Forms.FTPRemoteFileList.FileDeleted(IAsyncResult result)
CAUSED BY:
EnterpriseDT.Net.Ftp.FTPException: deletion failed (code=550)
at EnterpriseDT.Net.Ftp.FTPControlSocket.ValidateReply(FTPReply reply, String[] expectedReplyCodes)
at EnterpriseDT.Net.Ftp.FTPClient.Delete(String remoteFile)
at EnterpriseDT.Net.Ftp.FTPConnection.DeleteFile(String remoteFile)
0 votes
by (1.4k points)
In the file, it will work if only 1 period in middle of file name for delete and rename. Any more it gives this error. Strange
0 votes
by (162k points)
The server is failing to delete the file, returning the error "550 deletion failed".

It looks like a bug in the server. It is also possible that the filename is simply too long - try with some shorter filenames.

Do you know what kind of FTP server it is (often listed in the welcome message)?
0 votes
by (1.4k points)
the server is WS_FTP Server, latest version. Maybe it is to long. If I remove 3 of the periods then it works. Let me try removing other letters

thanks
0 votes
by (1.4k points)
No, it is definetly the extra periods in file name and is the server for sure. Tried a different client and got same result

Categories

...