batch file for ftp

March 11, 2013 at 11:25:23
Specs: Windows server 2008
I want a batch file which ask for
1. ftp server IP (as we have multiple ftp servers),
2. ftp username,
3. ftp password,
4. put 2 files to ftp server from different location

plz help urgent
thanks in adv

See More: batch file for ftp

Report •

March 11, 2013 at 18:36:41
@echo off & setlocal
set serv=
set id=
set pass=
set /p serv=server:
if not defined %serv% goto :eof
set /p id=id:
if not defined id goto :eof
set /p pass=passwd:
if not defined pass goto :eof
(echo open %serv%
echo user %id%
echo %pass%
echo put file1
echo put file2
) > ftemp
ftp -n -s ftemp
::==== end batch
not sure how to get your two files, unless they are prompted for, in which case you can probably fill in the blanks for prompting etc.

Report •
Related Solutions

Ask Question