Subj : Re: How to execute a shell command To : borland.public.cpp.borlandcpp From : "Ed Mulroy [TeamB]" Date : Mon Feb 02 2004 07:43 am As Mr Klein has said, the system command is not the way to change the program's current directory. The function chdir does that. What version of Borland C++ are you using? What platform is the target of the project? You can check that by doing this: Right click on the EXE file name in the project window. Select TargetExpert in the popup menu that appears. In the TargetExpert dialog the platform and memory model are shown. .. Ed > Siemel Naran wrote in message > news:401df42c$1@newsgroups.borland.com... > > > First, system does not respond to the cd command. > string command("cd .."); > system(command.c_str()); > > But GetCurrentDir() returns the same value before and > after the system command. > > The system command does not always respond to the > new text color. > > textcolor(YELLOW); > cprintf("dir"); > textcolor(LIGHTCYAN); > cprintf("\r\n"); > system("dir"); > > The last command executes in the color YELLOW, but it > should execute in the color LIGHTCYAN. .