Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Q: dos shell host=ipaddress

2 views
Skip to first unread message

u4104...@spawnkill.ip-mobilphone.net

unread,
Sep 11, 2001, 7:36:05 PM9/11/01
to
in my ftp1.bat file i have:

ftp -ivn %1 < ftp2.dat.

ftp2.dat2 contains some ftp commands

how can i assign the ipaddresses to the host names
in this file. this is going to run on the windows to
pull files
from unix. can i say:

host1=xx.x.xx.xxx
host2=xx.x.xx.xxx
ftp -ivn %1 < ftp2.dat

i tried this but it did not work..

Jim

--
Sent by msg124 from hotmail part of com
This is a spam protected message. Please answer with reference header.
Posted via http://www.usenet-replayer.com/cgi/content/new

Rik D'haveloose

unread,
Sep 12, 2001, 6:56:49 PM9/12/01
to
msg...@hotmail.com <u4104...@spawnkill.ip-mobilphone.net> wrote

> in my ftp1.bat file i have:
>
> ftp -ivn %1 < ftp2.dat.
>
> ftp2.dat2 contains some ftp commands
>
> how can i assign the ipaddresses to the host names
> in this file. this is going to run on the windows to
> pull files
> from unix. can i say:
>
> host1=xx.x.xx.xxx
> host2=xx.x.xx.xxx
> ftp -ivn %1 < ftp2.dat
>
> i tried this but it did not work..

try to learn basic batch first ???
what are you meaning with the command " host = .... "?

if i get your problem, maybe something along the lines of:

for %%h in (xx.xx.xx.xx yy.yy.yy.yy) do call ftp1.bat

would do it ?
But it may also be that you want to change some numbers in ftp2.dat,
which is not really trivial in batch (for newbies), and needs some text
or commandline editor util or more advanced study of batch with
assistance of the 'faq' listing from T.Salmi.

> This is a spam protected message. Please answer with reference header.

i do not bother about that, if you want an answer, remove spam
protection :-)

--
TUF Greetings from Rumbeke
Belgium


Frank-Peter Schultze

unread,
Sep 16, 2001, 12:09:12 PM9/16/01
to
"Rik D'haveloose" <brol.d...@xs4all.be> schrieb im Newsbeitrag news:9ntn3d$hht$2...@news1.xs4all.nl...

> msg...@hotmail.com <u4104...@spawnkill.ip-mobilphone.net> wrote
>
> > in my ftp1.bat file i have:
> >
> > ftp -ivn %1 < ftp2.dat.
> >
> > ftp2.dat2 contains some ftp commands
> >
> > how can i assign the ipaddresses to the host names
> > in this file. this is going to run on the windows to
> > pull files
> > from unix. can i say:
> >
> > host1=xx.x.xx.xxx
> > host2=xx.x.xx.xxx
> > ftp -ivn %1 < ftp2.dat
> >
> > i tried this but it did not work..
>
> try to learn basic batch first ???
> what are you meaning with the command " host = .... "?
>
> if i get your problem, maybe something along the lines of:
>
> for %%h in (xx.xx.xx.xx yy.yy.yy.yy) do call ftp1.bat
>
> would do it ?
> But it may also be that you want to change some numbers in ftp2.dat,
> which is not really trivial in batch (for newbies), and needs some text
> or commandline editor util or more advanced study of batch with
> assistance of the 'faq' listing from T.Salmi.

Use FTP's script switch "-s" to specify the command file, for example:

For %%H In (ip1 ip2) Do Ftp -ivn %%H -s:ftp2.dat

--
Frank-Peter Schultze <fpsch...@my-deja.com>, http://www.fpschultze.de

0 new messages