Posted 09 February 2010 - 12:35 PM
How do you pass a variable (or possibly more than one) to a called batch script?
An example of what I am trying to do is(in sudo code where // signifies a comment):
//assigns the value E: to variable DriveLetter
OS =call "GetOS.bat" \DriveLetter
//Returns either V for Vista, X for XP, 7 for Windows 7, or 0 if no OS is found on the
//drive DriveLetter wich in this case would be E:
//(I don't need the code for how to do this check, just how to pass the variable to and from)
if OS != 0 DO call "Cleanup%OS%.bat" \DriveLetter
//Runs one of 3 cleanup scripts name CleanupX.bat CleanupV.bat and Cleanup7.bat
//on the drive DriveLetter
I hope what I am trying to accomplish is clear, if not I would be more than happy to elaborate...