Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

My script looks something like this:

ftp -i -d -s:C:\Automation\FTP_Config_Files\FTP.txt

My FTP.txt reads like this:

open xx.yy.xx.zz
lcd Z:\
cd /inetpub/wwwroot
mdelete *
mput *

Basically I want to delete ALL files and folders (about 10 folders and 25 files) in the "/inetpub/wwwroot" directory, however mdelete * is not deleting the directories. Can anyone give any insight on this dilemma I face. I can only do this via cmd for automation purposes (to deter the answers like use FileZilla or CuteFTP). Thank you!

share|improve this question

migrated from stackoverflow.com Nov 8 '12 at 15:07

This question came from our site for professional and enthusiast programmers.

1 Answer 1

mdelete will only delete a directory if it's empty.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.