Batch script to Delete files in FTP

Microsoft Windows xp professional w/serv...
October 7, 2010 at 03:16:45
Specs: Windows XP

- I need to write a batch script to delete the files in FTP location /test/plus.
- I used the following script.

cd E:\ABC
@ftp -i -s:"%~f0"&GOTO:EOF
open XYZ
cd /test/plus
delete *.zip

- But it deletes the *.zip files in local folder E:\ABC.

Please help with this as i'm new to scripts.

Note: Instead of 'delete' command i used 'mget' and it worked fine. All the *.zip files are uploaded to my local folder from FTP.

See More: Batch script to Delete files in FTP

Report •

October 7, 2010 at 06:34:39
Somehow i myself got the solution now. To delete "*.zip" files i should have used "mdelete" command.

- delete is used to delete a single specific file.
- mdelete is used to delete multiple files.

Now it works fine. :-) Cheers!!!

Report •

October 7, 2010 at 08:14:08
Not obvious why DELETE does a local file and MDELETE does remote files.

But, yeah, if you say so.

BTW, what is the -i option doing?

Helping others achieve escape felicity


Report •

Related Solutions

Ask Question