FTP and batch

Unknown UNKNOWN
February 9, 2009 at 18:11:31
Specs: Windows Server 2003, 1gb
i want to batch upload all jpgs and rars that
i've been renaming and i m trying to use this
but when i drag and drop all the files on it
... it only uploads 1 file and then stops.
what am i doing wrong? is there some batch
program that could do the work for me?

@echo off
echo user USERNAME ftpcmd.dat
echo PASSWORD>> ftpcmd.dat
echo bin>> ftpcmd.dat
echo put %1>> ftpcmd.dat
echo quit>> ftpcmd.dat
ftp -n -s:ftpcmd.dat xx.xx.xx.xx
del ftpcmd.dat


See More: FTP and batch

Report •


#1
February 10, 2009 at 15:39:20
Untested:
@echo off
echo user USERNAME ftpcmd.dat
echo PASSWORD>> ftpcmd.dat
echo bin>> ftpcmd.dat
:loop
echo put %1>> ftpcmd.dat
SHIFT
IF NOT "%1"=="" GOTO loop
echo quit>> ftpcmd.dat
ftp -n -s:ftpcmd.dat xx.xx.xx.xx
del ftpcmd.dat


Report •

#2
February 11, 2009 at 01:16:41
it didn't work. thanks for trying though.

Report •

#3
February 11, 2009 at 03:19:24
There was a typo. It's fixed now.

Report •

Related Solutions

#4
February 11, 2009 at 04:14:01
ok there was another typo but it still only
uploads 1 file and then quits.

Report •

#5
February 11, 2009 at 05:22:00
Hard to see how this does anything useful:

echo user USERNAME ftpcmd.dat


=====================================
If at first you don't succeed, you're about average.

M2


Report •

#6
February 11, 2009 at 05:54:48
it should be

echo user USERNAME> ftpcmd.dat

i made a mistake when i wrote it in the first
post. and well it should be the username to
login in the ftp


Report •


Ask Question