# Directories in TurboC++



## motocross95 (Oct 30, 2001)

I am using Borland Turbo C++ version 3. Can someone help me please. Whenever I load up the program I have to reset the include and BGI directories. It's not just those two though all the ones on that menu. Anyone have a way to set those directories automatically when I run the application? Any help would be GREATLY appreciated thank you.


----------



## MacFromOK (Mar 19, 2001)

If your PATH is set to include the directories, it
should work OK.

You can modify the PATH line in your autoexec.bat
file to include your compiler (or other) directories,
just place a semi-colon between each added path.

Example original line (yours may vary):
SET PATH=c:\dos;c:\windows;c:

Example new line (yours may vary):
SET PATH=c:\dos;c:\windows;c:;c:\tc\bin;c:\tc\bgi

OR you can make a batch file to do the same
thing and run it before loading your compiler.
Just use the %path% var as shown to avoid
losing your original path setting. NOTE: only
run this once between reboots because the
%path% variable will keep adding to itself
each time it's run (you could just copy the
current path itself instead of using %path%).

(Again, yours may vary)
SET PATH=%path%;c:\tc\bin;c:\tc\bgi

Cheers, Mac


----------



## motocross95 (Oct 30, 2001)

I don't really understand the deal about the autoexec.bat thing. When I load up Turbo C++ and go to options, then directories and it tells the directories for specified files when compiling. Well I set them so the programs will work and everything but when I exit the program and start it back up I have to change the directories again. They never are saved. Thanks


----------



## MacFromOK (Mar 19, 2001)

OK, what is the drive\directory of your Turbo C++?

Also, goto a DOS prompt and type:

path

then press ENTER. Post the results here.


----------



## motocross95 (Oct 30, 2001)

I'm running XP, and it can't find "path". My turbo C++ is located at "C:\TC\TC\", I know I know, why not just have it at "C:\TC\" well I'm just too lazy to do that hehe. I will eventually, now back to the problem at hand.


----------



## MacFromOK (Mar 19, 2001)

Ouch... I don't think XP runs DOS as we know it,
so I don't have a clue on this one. Sorry.

Cheers, Mac


----------



## motocross95 (Oct 30, 2001)

XP has a command prompt


----------



## MacFromOK (Mar 19, 2001)

I'm sure it does, but the absence of a PATH
command pretty much kills my suggestions.

You might try typing:

set

and then press ENTER. If it has a list of vars
and one is PATH=(whatever), we might still
come up with something. Otherwise you'll
need some input from an XP user.

I'm still running Windows 95...

Cheers, Mac


----------



## motocross95 (Oct 30, 2001)

Nope "set" does not do anything, it can't find it. Anyone else have any input? Remember directories in Turbo C++ won't stay and I must change them everytime I start Turbo C++.


----------



## motocross95 (Oct 30, 2001)

Does no one else have any idea? Surely someone must have had this problem before.


----------



## motocross95 (Oct 30, 2001)

ANYONE OUT THERE!?


----------



## MacFromOK (Mar 19, 2001)

Since it seems this is going to require an
XP specific solution, you might try posting
in the Windows NT/2000/XP forum.


----------



## motocross95 (Oct 30, 2001)

How about if I right click on the icon, click properties, then add the directories somehow onto the command line so they load up every time the program starts? Think that would work? if you think it would could you tell me the syntax of doing that. thanks.


----------



## motocross95 (Oct 30, 2001)

Problem fixed. I asked a very knowledgable fellow up here and he told me to unclick read-only on the files, so I did it and it worked. In case anyone had that problem before.


----------



## MacFromOK (Mar 19, 2001)

Great, glad you found the problem. 

You mentioned:


> _Originally posted by motocross95 _
> *How about if I right click on the icon, click properties, then add the directories somehow onto the command line so they load up every time the program starts? Think that would work? if you think it would could you tell me the syntax of doing that. thanks. *


This wouldn't have worked anyway. You
can specify a start directory in the properties
window, but not a whole list (unless XP is
different...). And you can't add multiple paths
to the command line.

Cheers, Mac


----------

