0

I have a program that can launch batch files (.bat) and I need to write a batch file to delete all files from an FTP directory.

My first try was the windows ftp command line program, batch file was:

ftp -i -s:ftpscript.txt

With the script being:

open ftp.hostname.com
myusername
mypassword
quote pasv
binary
cd In
mdelete *.txt
quit

After trying this for a while I found the ftp program doesn't support passive mode... great!

Next I tried ncftp but I can't find any commands that can delete without downloading files.

Question

Is there any way to either:

get ftp windows command working under passive mode? make ncftp delete all remote files in a directory? use any other command line program (in windows) which will support passive mode and delete an entire directory?

bendataclear
  • 3,802
  • 3
  • 32
  • 51

1 Answers1

0

Found another utility which worked perfectly WinSCP.

Also referenced this script:

WinSCP command-line passive mode

Community
  • 1
  • 1
bendataclear
  • 3,802
  • 3
  • 32
  • 51