Delete all files in a folder via FTP using ftp batch script

Make the script package as follows:

>>ftp.txt open ftp.site.com
>>ftp.txt username
>>ftp.txt password
>>ftp.txt directoryname
>>ftp.txt quit
ftp -s ftp.txt

How to delete all files in the directory_name folder?

+5
source share
1 answer

Put the following commands in ftp.txt and follow these steps to complete this task:
ftp -i -s:ftp.txt

ftp.txt content:

open ftp.site.com
username
password
cd directoryname
mdelete *
quit
+14
source

All Articles