September 14th, 2011, 06:04 PM
Couple of FTP questions
I'm integrating a ftp uploader into a Flash Air project.
It's working well, apart from the fact that I cannot delete more than one file at a time on the server.
I can successfuly delete a file if I specifically name it, but can't make flash delete everything in a given folder...
... successfully deletes contact.php, but (and this is after I've added a test file back into the 'menu' dir)...
...gives me a 550 error...
550 Could not delete public_html/menu/*.*: No such file or directory
I thought the *.* meant 'everything'. If not, is there a way to do it?
The second questions relates to the different ftp server systems that are out there. Is it correct that there are different sets of return codes? I understand that you can prompt the server to see what system it is using, but I was wondering if there is a list somewhere of a) what systems are available, and b) their return codes?
Thanks for your time and help.
September 14th, 2011, 07:35 PM
The commands and return codes that are available on FTP servers are mostly standardized, although some FTP servers do offer custom commands or return codes that are not. Here's a list of standard return codes: http://en.wikipedia.org/wiki/List_of...r_return_codes
To the best of my knowledge, standard FTP does not include a wildcard or a recursive delete. You need to delete files and directories one by one. Also note that in almost all cases the FTP server will not allow you to delete a directory that is not empty.
*.* never really means everything; within the context of most operating system shells it means any file that has text, a dot and then more text. In a lot of cases that essentially means all files, but it's certainly possible to have a file without a dot or without text on one side of the dot, and *.* would not match those files. It's sort of besides the point though, since FTP doesn't support it anyway.
September 14th, 2011, 07:55 PM
Try the mdelete command?
ftp> help mdelete
mdelete Delete multiple files
The moon on the one hand, the dawn on the other:
The moon is my sister, the dawn is my brother.
The moon on my left and the dawn on my right.
My brother, good morning: my sister, good night.
-- Hilaire Belloc
September 14th, 2011, 11:39 PM
That return codes list is certain helping out.