Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Transfer of control to command prompt  (Read 3098 times)

0 Members and 1 Guest are viewing this topic.

NotAGeek

  • Guest
Transfer of control to command prompt
« on: October 07, 2004, 06:56:45 PM »
Does anybody know if there is anyway to transfer control to a new command prompt from the existing one?
for example I am trying to write a batch file which will open up a new command prompt and then all the things I want to do would be done on new command prompt and not the old one.

for eg.
@ECHO OFF
START C:\Windows\System32\cmd
cd C:\SomeFolder
pause
exit

above commands opens a new command prompt but let's say if I want to change directory on that new command prompt how do I do it?
in the case above it will change directory in the first command prompt. not the one that is opened by this batch file

MalikTous

  • Guest
Re: Transfer of control to command prompt
« Reply #1 on: October 09, 2004, 05:33:35 PM »
CALL opens a new command shell session, but I'm not sure if you can switch about between spawned sessions, I think you can only run a second batch or executable in the second session and then close it and resume processing the parent batch file.