views:

26

answers:

2

Hi,

How can i write a MS dos ftp batch file to:

  1. download files from the server to my local pc
  2. remove these files from the server after download

cheers!

Edit

ok so far i have...

Batch file:

ftp.exe -s:ftp.txt

FTP.txt:

open domain.com

usernamehere

passwordhere

cd /httpdocs/store/files

need get, list and delete commands here??

quit

+1  A: 

The ftp.exe program can take a sort of script file as input (that example uploads a file, but I guess to get the idea), so you should probably be able to create a script for the commands that you need to carry out, and then have a batch file launch ftp.exe with the appropriate input.

Fredrik Mörk
A: 

you can download ncftpput/ncftpget. With ncftpget, there's option to remove remote files after downloading.

ghostdog74