Computing.Net > Forums > Programming > FTP and batch

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Click here to start participating now! Also, check out the New User Guide.

FTP and batch

Reply to Message Icon

Name: bertalan
Date: February 9, 2009 at 18:11:31 Pacific
OS: Windows Server 2003
CPU/Ram: 1gb
Product: Unknown / UNKNOWN
Subcategory: Batch
Comment:

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



Sponsored Link
Ads by Google

Response Number 1
Name: Razor2.3
Date: February 10, 2009 at 15:39:20 Pacific
Reply:

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


0

Response Number 2
Name: bertalan
Date: February 11, 2009 at 01:16:41 Pacific
Reply:

it didn't work. thanks for trying though.


0

Response Number 3
Name: Razor2.3
Date: February 11, 2009 at 03:19:24 Pacific
Reply:

There was a typo. It's fixed now.


0

Response Number 4
Name: bertalan
Date: February 11, 2009 at 04:14:01 Pacific
Reply:

ok there was another typo but it still only
uploads 1 file and then quits.


0

Response Number 5
Name: Mechanix2Go
Date: February 11, 2009 at 05:22:00 Pacific
Reply:

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


0

Related Posts

See More



Response Number 6
Name: bertalan
Date: February 11, 2009 at 05:54:48 Pacific
Reply:

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


0

Sponsored Link
Ads by Google
Reply to Message Icon

Ensure that folder is emp... Batch Diagnosics



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: FTP and batch

FTP and Batch Files www.computing.net/answers/programming/ftp-and-batch-files/13160.html

FTP DOS Batch File www.computing.net/answers/programming/ftp-dos-batch-file/15347.html

FTP Download Batch File ( BAT ) www.computing.net/answers/programming/ftp-download-batch-file-bat-/15790.html