Guest tlotzerguard-usergroups@yahoo.com Posted July 30, 2007 Posted July 30, 2007 in DOS in Win98 SE, if I CD or CHDIR to G:, the prompt still says C: \ . I remember that I used to get the drive that I switched to.
Guest Hugh Candlin Posted July 30, 2007 Posted July 30, 2007 Re: prompt still says C: <tlotzerguard-usergroups@yahoo.com> wrote in message news:1185821996.689731.229340@e9g2000prf.googlegroups.com... > in DOS in Win98 SE, if I CD or CHDIR to G:, the prompt still says C: > \ . I remember that I used to get the drive that I switched to. The CD command is a Change Directory command, not a Change Drive command. If you issue the command CD G: then DOS will simply display the name of the current directory on the G drive, but it will not switch to it. From the C drive, you can switch to the G drive by simply typing G: from the C prompt. [Note that there is a colon after the drive letter when you issue a command] -- "You can fool some of the people all of the time, and those are the ones you want to concentrate on."
Guest RobertVA Posted July 30, 2007 Posted July 30, 2007 Re: prompt still says C: tlotzerguard-usergroups@yahoo.com wrote: > in DOS in Win98 SE, if I CD or CHDIR to G:, the prompt still says C: > \ . I remember that I used to get the drive that I switched to. > By "In DOS" do you mean DOS in a window/virtual machine OR DOS mode (reboot to DOS)? Are you using the one of the default shortcuts or a shortcut you created yourself? Note that CD and CHDIR normally only changes directory in the current drive. Most people would enter "G:" to change the current drive to G:. If you have accessed that drive since booting, which includes starting DOS Mode, the operating system will remember the last path used on that drive. Newer versions of CHDIR MAY include a "/D" switch to change drives and directory in the same command. Do you get a command summary/reference when you enter "prompt /?" or "chdir /?"? Which drive and directory is listed when you execute a "dir" command? What happens after you enter "PROMPT $P$G"? Do you have an autoexec.bat file in the root folder of the boot drive on your system? Does it contain a line starting with "prompt" or "PROMPT"?
Guest cquirke (MVP Windows shell/user) Posted August 2, 2007 Posted August 2, 2007 Re: prompt still says C: On Mon, 30 Jul 2007 11:59:56 -0700, >in DOS in Win98 SE, if I CD or CHDIR to G:, the prompt still says C: >\ . I remember that I used to get the drive that I switched to. As has been noted, CD does not change drive letter. You have a current drive letter, which is changed by entering the new drive letter as a command, e.g. Current drive = C: C:\SomePath> G: <enter> Current drive = G: G:\> Each drive letter has a current directory, and it is this that the CD command will either display... Command... C:\SomePath> CD Output... C:\SomePath ....or change: Command... C:\SomePath> CD \New\Path Output... (none) Current drive = C: Current directory for C: = \New\Path Current directory for G: = \ (unchanged) C:\New\Path> When you specify a drive letter in a CD command, you are specifying which drive's current directory is to be changed: Command... C:\SomePath> CD G:\New\Path Output... (none) Current drive = C: Current directory for C: = \SomePath (unchanged) Current directory for G: = \New\Path C:\SomePath> There is an evolution of CD syntax that allows one to change drive and directory in one go, but I don't know if that applies to Win98. It may be part of the .BAT enhancements within the NT family. >-------------------- ----- ---- --- -- - - - - Tip Of The Day: To disable the 'Tip of the Day' feature... >-------------------- ----- ---- --- -- - - - -
Recommended Posts