Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I pass a dos batch file variable to a ftp script file?

Status
Not open for further replies.

braidwood

Programmer
May 31, 2001
1
US
I have a batch file that just run ftp using a script I can get the variable to the batch
file to but not the script file. I would be grateful for any help.

thanks phil
 
There are two kinds of variables in a batch files
The first is environment variables:

You can set them with commands like

SET VAR1=ftp10.netscape.com

and print them with stuff like
ECHO %VAR1%

Now, to send these variables to a script file, you'd do something like
ECHO %VAR1% >> scriptfile.txt

The other kind is command line variables (parameters)
You can set an environment variable to equal the first command line
variable using
SET VAR1=%1

Then you can use it like above.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top