Computing.Net > Forums > Disk Operating System > Passing Parameters between multiple batch files

Passing Parameters between multiple batch files

Reply to Message Icon

Original Message
Name: ian
Date: April 14, 1999 at 19:27:58 Pacific
Subject: Passing Parameters between multiple batch files
Comment:

I trying to create batch file /s that would do the following things:

1st - Copy files between file servers (3 or more file servers)
2nd - Create a log file that would list the files that were copied & the time it was moved to that server
3rd - Name the log file with the user inputted value - preferably mm/dd/yyyy format with an extension .log
4th - Do all this things using one command

What I did
1st - Create a mother batch file that will do the following things
= Input the log-file name, target directories
= Use the FOR command to run a separate batch file which would do the actual copying of files to the different servers

PROBLEM
I cannot run the switches on the following things
1. passing of log name since i used the %1 on the root batch file
2. passing of target servers since i used the %2 on the root batch file

It is my understanding the when you use the CALL command you should specify the parameters that you're passing to the child batch file. Also on the child batch file I really don't know how to specify what to receive since I used these two values on the root batch (%1, %2)

PLEASE HELP


Report Offensive Message For Removal








Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: Passing Parameters between multiple batch files

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software




How often do you use Computing.Net?

Every Day
Once a Week
Once a Month
This Is My First Time!


View Results

Poll Finishes In 3 Days.
Discuss in The Lounge