Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 Nov 8 '12 at 15:07

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

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

share|improve this answer

You must log in to answer this question.