ftp to remove file
I would like to write a scritp to use ftp to get a file , then remove it , I can get the file now , but how to remove it after get , I tried the command in ftp ( eg. remove , del , delete * ) but still not work , can advise what can i do ? thx
|
The site from which you downloaded the file must set the permissions on the file to allow you write access before you can delete it. If you do not have write permission then you cannot delete the file.
------------------------- Steve Stites |
Quote:
thx reply , the user have full permission , what command ( eg .remove , del , delete ) should I use ? thx |
I tried , it should use del , but if use del * , it is not work , if use del filenMe , it is OK , if I want to remove all file in a file , what can i do ? thx
|
probably rm?
Did you try
Code:
rm file Or, you could just type Code:
? |
Quote:
I tried mdelete , it is OK to remove the file in remote site , but still show the below message after run it , can advise what is wrong ? thx Delete operation failed. |
I have one more question ,
I edited this ftp script , it can put and get the files well ,if I want to add a comparsion script (eg. comparsion_script) to this ftp script , can advise what can i do ? Thx ftp remote_server<<EOF prompt off lcd dir1 passive cd dir1 put * lcd dir2 get * mdelete * comparsion_script EOF |
All times are GMT -5. The time now is 11:49 AM. |