News:

It appears that the upgrade forces a login and many, many of you have forgotten your passwords and didn't set up any reminders. Contact me directly through helpmelogin@dodgecharger.com and I'll help sort it out.

Main Menu

Computer geeks need some help with scripting

Started by 73dodge, April 11, 2007, 06:48:49 PM

Previous topic - Next topic

73dodge

You computer geeks, you know who you are i need some help.

I want to create a script to run from a Windows XP pc I need it to do the following

login to a FTP server with a username and password
execute a BI command
execute a HA command
execute a get file command
Close and quit the script.

I tried to create a DOS batch file but it stops after issuing a FTP command. I am absolutely no scripting Guru and I hate doin this type of programming because I suck at it. i would rather bang on a server with a hammer than figure out how to write a script.

I need it to be simple and run on a XP machine without having to buy some special program to create it and run it

Troy? any one?

Why am I asking this question on a car site? because this and Moparts are the only sites I belong to and if I post on Moparts it will get buried to page 498 in about 30 seconds. I also know that their about 3 people on this site that can answer this question.

any one????




Alcohol, Tobacco and Firearms should be a convenience store NOT a government agency!

ipstrategies

I would look into wsh (windows scripting host) it will allow you to use vbscript or javascript that runs on your machine.


http://www.microsoft.com/technet/scriptcenter/guide/sas_wsh_qlcc.mspx?mfr=true
1971 Dodge Charger SE 383 Magnum
1999 Dodge Durango 5.9
1995 Chrysler LHS

73dodge

Thanks

That helps.........

No all I gotta do is figure out how to create what I want and get it to do what I want it to do.
Alcohol, Tobacco and Firearms should be a convenience store NOT a government agency!

dodgecharger-fan

If you create a file called getmydata.bat (or whatever you want to call it)containing this:

ftp -s:%0.bat
goto done
open someftpserver.somedomain.org    <---- insert the real ftp server address
myusername                                      <---- insert your real username
mypassword                                       <---- insert your real password
binary
hash
get %1
bye
:done

you could then retrieve your file from the remote system just by typing

"getmydata <filename>" at a command line.

If you wanted to generalize it a bit more and make the username and password you could put %2 and %3 in place of myusername and mypassword respectively.
Then you'd type "getmydata <filename> <myusername> <mypassword>"

If it's something you do a lot, you could make it even easier by placing a shortcut on your desktop or quicklaunch toolbar.

The ftp script is effectively hidden from the batch interpreter because the second line causes the batch interpreter to skip over it. You can't hide the first two batch commands from the ftp program, but the script works anyway because the ftp program simply generates an error message and skips to the next line whenever it encounters something it doesn't understand. Any batch commands added after the ":done" label will not be seen by the ftp program because it exits when it gets to the "bye" at the end of the script.


I found most of this on the weeb, but I added the use of the extra variables - 'cause that's how this geek rolls..  :icon_smile_cool:

73dodge

Thanks dodgecharger-fan I will give it a shot and see what I can do.

hey man you going to attend the MCSE boot camp? I go next week.........
Alcohol, Tobacco and Firearms should be a convenience store NOT a government agency!

dodgecharger-fan

Quote from: 73dodge on April 13, 2007, 08:22:16 AM
Thanks dodgecharger-fan I will give it a shot and see what I can do.

hey man you going to attend the MCSE boot camp? I go next week.........


I requested to go but I got no invite....
It's in Richmond, right?

Any other training I might get will be in Ottawa.... t least it will be in the summer time.

dodgecharger-fan

Speaking of which. I got a last minute invite to Advanced Campus next week. I'll get to five the new ChaRAMGer a good run.