-----------------------------------------------------------
New Message on cochindotnet
-----------------------------------------------------------
From: spark
Message 1 in Discussion
Hi,
It would be helpful if someone could tell me how to write
a win32 c/cpp console program that can change the current
folder of the shell window where it is called ?
for example (changedir.cpp):
#include <direct.h>
void main(int argn, char ** argv) {
chdir(argv[1]);
}
> changedir ..
This will not do anything - the chdir() will change the
current working folder only for the process that is
making the call and will simply not affect its parent
shell.
What can I do ?
(Please dont ask me create a temporary batch file that
contains a 'cd' command). I am guessing that I can
somehow putenv() something that will cause cmd.exe to
chnage dirs... but I have no clue.
Any help would be appreciated.
Thanks in advance,
Roshan James
-----------------------------------------------------------
To stop getting this e-mail, or change how often it arrives, go to your E-mail
Settings.
http://groups.msn.com/cochindotnet/_emailsettings.msnw
Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help
For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact
If you do not want to receive future e-mail from this MSN group, or if you received
this message by mistake, please click the "Remove" link below. On the pre-addressed
e-mail message that opens, simply click "Send". Your e-mail address will be deleted
from this group's mailing list.
mailto:[EMAIL PROTECTED]