-1

I am trying to process the file in below order please point me in right direction.

  1. Switch to the D drive by Entering: D: (Successful)
  2. Change to directory D:\IBM\InformationServer\ASBNode\bin. (Successful)
  3. Execute the processEnvVariables.bat for the new EDW project the command is listed below with an example of the format of the command. (Failure)

processEnvVariables.bat -dir D:\IBM\InformationServer\Server\Projects\EDW –dom localhost –port 9080 -u –p

Do I execute after I have successfully completed step 2 or before because while executing step2 after step 2 I am receiving an error for The project_dir should be in different folder for example c:\IBM\Informationserver\server\projects\myproj.

I basically need help with entering below.

Format of command: processEnvVariables.bat

processEnvVariables.bat -dir D:\IBM\InformationServer\Server\Projects\EDW –dom localhost –port 1234 -u –p

Thank you in advance for your help.

1 Answers1

0

Use this batch code:

pushd "D:\IBM\InformationServer\ASBNode\bin"
call processEnvVariables.bat -dir D:\IBM\InformationServer\Server\Projects\EDW –dom localhost –port 9080 -u –p
popd

The first command saves/pushes the path of current directory on stack which is most likely C:\IBM\Informationserver\server\projects\myproj on drive C: and then sets the specified directory D:\IBM\InformationServer\ASBNode\bin as new current directory.

The second command calls the other batch file which for some unknown reason works with directory D:\IBM\InformationServer\Server\Projects\EDW and drive D: according to the parameters. I don't have this batch file and therefore don't know what is the purpose of this batch file.

The usage of command CALL is important here as otherwise the processing of the current batch file is continued on processEnvVariables.bat and the third command in this batch file would be never executed as Windows command processor would never come back to current batch file on running the other batch file without command CALL.

The third command loads/pops the previously saved current directory path from stack and makes this directory again the current directory.

For understanding the used commands and how they work, open a command prompt window, execute there the following commands, and read entirely all help pages displayed for each command very carefully.

  • call /?
  • popd /?
  • pushd /?
Mofi
  • 46,139
  • 17
  • 80
  • 143