Jump to content

Path in command prompt

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
2 replies to this topic

#1
Actor

Actor

    Newbie

  • Members
  • PipPip
  • 24 posts
I've discovered that the autoexec.bat and config.sys files on my Windows XP machine are both empty files. Yet when I type path from the command prompt window a quite complex path is displayed. So how does the path get defined if autoexec.bat is empty? More to the point, how can I change it?

I've been putting all my source files in a different directory for each project. This means I have to put a copy of my compiler in each directory. I'd like to create a directory C:>\exe, put my compiler and all my .exe files there, and change the path so the computer can find them, but the fact that autoexec.bat is empty suggests that putting a path statement in autoexec.bat could have unexpected side effects. What should I do?

#2
Alexander

Alexander

    It's Science!

  • Moderators
  • 4,118 posts
autoexec.bat is an archaic remnant of DOS and isn't really required unless for legacy purposes. To change environment variables go to this:
Control panel -> System -> Advanced -> Environment Variables. There should be in the "system variables" a variable named "Path". This should allow you to enter your own path to the compiler of your liking, this means that you will not need a copy of the compiler in each directory, You can simply call it from anywhere (much like you do system commands such as cd/dir etc.)

#3
Actor

Actor

    Newbie

  • Members
  • PipPip
  • 24 posts
Thank you. That is exactly what I needed to know. :cool: