I have a text file, name.txt, with only one line in it as follows:
I wrote a batch file with the following contents:
So I changed the bat, changing ping -a -n 4 -r 5 <<name.txt
to ping -a -n 4 -r 5 <name.txt
Then it shows: IP address must be specified.
I remember that on a Win98 machine I used <<, but now on WinXP I can't see any effect. What should I do? Is the command wrong?
At first I thought maybe you couldn't use a computer name and had to use an IP; but after I changed it to an IP, it was still the same effect, sweat, sweat, sweat, sweat. I'd appreciate some guidance from the seniors, many thanks!
[ Last edited by HAT on 2009-1-13 at 14:33 ]
B190
I wrote a batch file with the following contents:
@echo off
ping -a -n 4 -r 5 <<name.txt
@pauseWhen I run this batch file, it just flashes by, sweat, sweatSo I changed the bat, changing ping -a -n 4 -r 5 <<name.txt
to ping -a -n 4 -r 5 <name.txt
Then it shows: IP address must be specified.
I remember that on a Win98 machine I used <<, but now on WinXP I can't see any effect. What should I do? Is the command wrong?
At first I thought maybe you couldn't use a computer name and had to use an IP; but after I changed it to an IP, it was still the same effect, sweat, sweat, sweat, sweat. I'd appreciate some guidance from the seniors, many thanks!
[ Last edited by HAT on 2009-1-13 at 14:33 ]
