computing
  • 10

Batch Script To Delete Files In FTP

  • 10

Hi,

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

Delete.bat
—————
E:
cd E:\ABC
@ftp -i -s:”%~f0″&GOTO;:EOF
open XYZ
user
password
cd /test/plus
delete *.zip
disconnect
bye

– 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.

Share

1 Answer

  1. 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

    M2

    • 0