Operating System - HP-UX
1753928 Members
8955 Online
108810 Solutions
New Discussion юеВ

ftp script launches browser

 
mahesh_13
New Member

ftp script launches browser

i have written a ftp script batch file to connect to the ftp server & upload a file.
m creating a temp txt file which contains the ftp commands.
this is what the batch file contains:

> C:\script.txt echo open ftp.abc.com
>> C:\script.txt echo abcd
>> C:\script.txt echo abcd
>> C:\script.txt echo cd Aggregation
>> C:\script.txt echo put C:\Eatecwin\data\SFO1368_EatecLite.zip
>> C:\script.txt echo bye
& then launching the ftp session
%windir%\ftp.exe -s:C:\script.txt

when i run the script, IE is launced & a FTP folder error message displayed.
& the address bar of the browser contains ftp://ftp.exe/
any thoughts?
none
5 REPLIES 5
harry d brown jr
Honored Contributor

Re: ftp script launches browser


Yes:

(1) install linux
(2) use perl to script ftp


live free or die
harry
Live Free or Die
James Beamish-White
Trusted Contributor

Re: ftp script launches browser

Why would you need to install linux to be able to run perl? ;-)

Anyways, if you are running winnt, the script would have to be %windir%\system32\ftp.exe. Have you tried running "%windir%\ftp.exe -s:C:\script.txt" from the command line?

Cheers!
James

PS: Harry has a point - this is a HPUX forum, not windows. :-)
GARDENOFEDEN> create light
harry d brown jr
Honored Contributor

Re: ftp script launches browser

It's too bad we can't do a push install?

BTW, you can get perl, like James said, for your M$ thing and script it using perl. And guess what? you could actually have ERROR HANDLING. I know it's something new to M$ machines, but there's no rule that says software you write can't have error detection and corrective action.

live free or die
harry
Live Free or Die
Fred Martin_1
Valued Contributor

Re: ftp script launches browser

I've experiences this, too. Look on the PC to see if you have more than one version of ftp.exe.

This was happening to me on a Win98 machine, so I copied ftp.exe from a Win95 machine (to another folder - not overwriting the original), and called the copied one explicitely:

C:\utils\ftp.exe ...etc

And it worked OK.

My only guess is that newer versions of ftp.exe are browser-aware, the older on is not.

I could be wrong but it solved the issue for me.

Fred
fmartin@applicatorssales.com
Wodisch_1
Honored Contributor

Re: ftp script launches browser

Hi Mahesh,

you problem originates form "Windows Explorer", NOT from "Internet Explorer", as the default handler for "FTP" is registerd for the former to be the latter...
You may have to unregister the "FTP" handler from your "Windows Explorer"!

Second, the first two lines of the input file to the "-s" option of M$'s FTP client have to be username, and password, and the target node is to be specified on the command line:

C:\> type script.txt
joe
secret
cd Aggregation
put C:\Eatecwin\data\SFO1368_EatecLite.zip
bye


C:\> %windir%\ftp.exe -s script.txt ftp.abc.com

And third, why not use an FTP client better than the one supplied by M$? Like the (free) one from CYGWIN:
http://sources.redhat.com/cygwin

HTH,
Wodisch