Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: zVariables for batch files  (Read 3951 times)

0 Members and 1 Guest are viewing this topic.

Javier Hernández Méndez

  • Guest
zVariables for batch files
« on: September 06, 2004, 05:28:02 PM »
 :)Please if someone could explain me how to use variables for doing batch files.
I have looked for something but doesn´t work.
I would really tank your help.

johnwill

  • Guest
Re: zVariables for batch files
« Reply #1 on: September 06, 2004, 06:33:34 PM »
I just gave an example in another thread, here's a copy.

If you're in a batch file, you use parameters.  For instance, if you wanted to run DIR and save the directory specification in an environment variable...

<contents of test.bat>
dir %1
set PARAMETER=%1

To invoke the batch job, an example is:

TEST C:\TEMP

When it runs, PARAMETER in the environment will contain C:\TEMP