Advertisement

05.04.2006 at 12:23AM PDT, ID: 21837611
[x]
Attachment Details

'Including' another file which contains my variables

Asked by nmcdermaid in MS DOS, Server Side Includes (SSI)

Tags: dos, variables, cmd, files

Hi,

We have a lot of seperate CMD files which all use the same variables.

ie

SET LoginName=AUser
SET SourcePath=C:\


is repeated in a dozen batch files


Is it possible to put all of these variables into one file then 'include' this one file in all my other files?


I was thinking that there is either a command similar to #include in C++, or maybe I can pre-run the CMD file which sets up the variables - do the variables exist between executions of a CMD file?

The objective is to simplify my scripts, therefore I would rather not implement a solution which adds more complexity!!Start Free Trial
[+][-]05.04.2006 at 12:24AM PDT, ID: 16603315

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: MS DOS, Server Side Includes (SSI)
Tags: dos, variables, cmd, files
Sign Up Now!
Solution Provided By: angelIII
Participating Experts: 1
Solution Grade: A
 
 
[+][-]05.04.2006 at 12:28AM PDT, ID: 16603333

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.04.2006 at 12:48AM PDT, ID: 16603416

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.04.2006 at 02:20AM PDT, ID: 16603816

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32