ProgrammingUsing Command Prompt to make a pathway.
Posted:
ProgrammingUsing Command Prompt to make a pathway.Posted:
Status: Offline
Joined: Jan 13, 201311Year Member
Posts: 541
Reputation Power: 28
Alright so say I have a folder on my D: drive instead of my C: drive. For an example well say the folder is called junk. When I go Into command prompt I want to stay in my C drive but be able to have access to the junk folder when I type the command "cd junk" into the command prompt. As is now If I search for junk in the cmd prompt will say the system cannot find the path specified. any help would be much appreciated |
#2. Posted:
Status: Offline
Joined: Jan 01, 201113Year Member
Posts: 1,957
Reputation Power: 401
Status: Offline
Joined: Jan 01, 201113Year Member
Posts: 1,957
Reputation Power: 401
It really depends on what you want to do with the files in the "junk" folder....
If you have executables in that folder, then you could add the "junk" folder to the Environment Variables "Path" entry... So if you have an EXE like D:\junk\junk.exe If you add "d:\junk" into the PATH Environment Variable, you can run junk.exe by just typing it in the command prompt, while you are in C: Could you give examples of what you have in the folder and what you need to do with them? |
- 2useful
- 0not useful
#3. Posted:
Status: Offline
Joined: Jan 13, 201311Year Member
Posts: 541
Reputation Power: 28
Imp wrote It really depends on what you want to do with the files in the "junk" folder....Alright so in my computer science class we have gcc.exe in a different drive than our file that we are working on that we want to compile. So our teacher when we search gcc nothing comes up because the computer doenst know the search path. i need to know how to set a address like you said with the D:junk/junk.exe . all i remember from class was at the end of the command it had %PATH% but after he put in the path his was able to type gcc and it would get the compiler. |
- 0useful
- 0not useful
#4. Posted:
Status: Offline
Joined: Jan 01, 201113Year Member
Posts: 1,957
Reputation Power: 401
Just browsing around, there is are specific Environment Variables that can affect GCC
https://gcc.gnu.org/onlinedocs/gcc/Environment-Variables.html If you need to just type GCC from anywhere, then you can use the below to set the PATH variable Windows 10 and Windows 8 In Search, search for and then select: System (Control Panel)
Windows 7 From the desktop, right click the Computer icon.
This should do the trick for you. |
- 1useful
- 0not useful
#5. Posted:
Status: Offline
Joined: Nov 05, 201311Year Member
Posts: 2,749
Reputation Power: 452
Status: Offline
Joined: Nov 05, 201311Year Member
Posts: 2,749
Reputation Power: 452
This is a late reply but couldn't you create a shortcut on the C drive then change directories into the shortcut? |
- 0useful
- 0not useful
Users browsing this topic: None