[AccessD] OT: Batch File variable

artful at rogers.com artful at rogers.com
Tue Feb 20 01:50:09 CST 2007


If you wish you can also pass it from the command line. Call the batch file like this:

myBatch 200702

and substitute %1 for every occurrence of 200702

EG \\SomeServer\SomeCoolFolder\SomeCoolFileFilder\
file:///\\SomeServer\SomeCoolFolder\SomeCoolFileFilder\%1
 
Arthur Fuller
Technical Writer, Data Modeler, SQL Sensei
Artful Databases Organization
www.artfulsoftware.com




----- Original Message ----
From: Stuart McLachlan <stuart at lexacorp.com.pg>
To: Darren DICK <darrend at nimble.com.au>; Access Developers discussion and problem solving <accessd at databaseadvisors.com>
Sent: Monday, February 19, 2007 8:54:36 PM
Subject: Re: [AccessD] OT: Batch File variable


On 20 Feb 2007 at 12:26, Darren DICK wrote:

> Is there a way to declare a variable in a batch file?
> 
> EG varMonthYear = 200702 and then just 'tack' that to the end 
> 
> EG \\SomeServer\SomeCoolFolder\SomeCoolFileFilder\
> <file:///\\SomeServer\SomeCoolFolder\SomeCoolFileFilder\>  & varmonthYear
> 
> That way I only have to edit the variable
> 

Environment variables.

To set it:
SET varmonthyear = "200702"
to use it:
.... + %varmonthyear%



-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com


More information about the AccessD mailing list