cancel
Showing results for 
Search instead for 
Did you mean: 

FTP commands

drw
Grafter
Posts: 124
Registered: 08-08-2007

FTP commands

What command is needed to delete all the files in a directory in ones web space.

DELE *
DELE *.*

do not work
5 REPLIES
Community Veteran
Posts: 14,469
Registered: 30-07-2007

FTP commands

Unix uses the rm command to delete files from a $ prompt.
rm filename will just delete filename
rm file* will delete all files and empty directories starting with file
rm * will delete all non hidden files in the current directory and delete any empty directories but will not delete directories which have files in.
rm -r * will do a recursive delete of all files and directories from your current directory including directories containing files.

Be extreamly careful when using this command, *nix does not have a recycle bin to recover files accidently deleted like windows, once it is deleted it cannot be recovered.

For a full list of options and command formats view the manual page for it (man rm).

Note: you can only delete files owned by you. Any files created by the webserver (which runs as user wwwuser) cannot be deleted. You need to raise a contact us ticket and ask support to delete those.

For FTP: it depends on the FTP package on what is possible. Most only allow you to delete individual files. I use WU_FTP and I just highlight all the files I want to delete and click the delete button. There is no option to delete all files in a directory.

If you are using a command line FTP package use mdelete which allows wild cards to be used.
drw
Grafter
Posts: 124
Registered: 08-08-2007

FTP commands

On the Plus net server in my web space the command RM is not recognised

These are the commands that are shown in response to the Help command

help
214-The following commands are recognized (* =>'s unimplemented).
214-USER PASS ACCT* CWD XCWD CDUP XCUP SMNT*
214-QUIT REIN* PORT PASV EPRT EPSV TYPE STRU
214-MODE RETR STOR STOU APPE ALLO* REST RNFR
214-RNTO ABOR DELE MDTM RMD XRMD MKD XMKD
214-PWD XPWD SIZE LIST NLST SITE SYST STAT
214-HELP NOOP FEAT OPTS ADAT* AUTH* CCC* CONF*
214-ENC* MIC* PBSZ* PROT*
214 Direct comments to root@ftp-plusnet.
Community Veteran
Posts: 14,469
Registered: 30-07-2007

FTP commands

I missed the FTP in your title. See my additional text in my previous post.

[append]
Looks like PlusNets FTP server does not support mdelete or any multiple file delete option so you will have to delete each file individually or reply on your FTP app to do this for you (WU_FTP as I use does this).
drw
Grafter
Posts: 124
Registered: 08-08-2007

FTP commands

Using NCFTP I can run a command

del *.* and it will delete all the files in the directory
however with
EMTEC FTP program

the wildcard function does not work - or it does not do the iterative read file name and delete function
Community Veteran
Posts: 14,469
Registered: 30-07-2007

FTP commands

As I said, different FTP apps do things in different ways. The del *.* was probably converted into a number of single DELE filename commands which were sent to PlusNets servers. That is how my multiple delete in WU_FTP is done.

Your only option is to find/use an FTP client that supports multiple file delete or delete each file individually with your current software.