Cannot manipulate remote files that end with an asterisk
|Reported by:||Dan Lech||Owned by:|
|Keywords:||asterisk delete file name||Cc:|
|Component version:||Operating system type:||Windows|
|Operating system version:||7|
I cannot rename or delete a file that ends in an asterisk (*).
Also, the asterisk does not show up on the file listing.
This can be reproduced with the following:
- log into FTP server
- Right click test file and chose rename.
- Add an asterisk to the end of the file name (in my case, test.txt became test.txt*)
- Important! Refresh the file listing.
- Notice that the asterisk is no longer in the file listing. (test.txt* now looks like test.txt)
- Try to rename or delete test.txt
You will get the following error:
Command: DELE test.txt
Response: 550 test.txt: A file or directory in the path name does not exist.
If I turn on raw directory listing in debug setting I see the following:
Response: 150 Opening data connection for /bin/ls.
Response: 226 Transfer complete.
Listing: total 8
Listing: -rw-r----- 1 dlech mis 2346 Feb 03 09:30 test.txt*
Status: Directory listing successful
Notice the asterisk is at the end in the debug listing but it's missing in the interface listing.
If I execute the following custom command it will delete:
Command: DELE test.txt*
Response: 250 DELE command successful.
The server OS in this case is AIX using standard FTP but I can repeat the problem on a linux system using SFTP except it rejects my custom commands when I try to delete manually.
We have an old system that creates temp files then end in asterisk that sometimes need to be cleared out. That is how I discovered the problem.