running msdos within bootcamp windoz - Need shortcut to retype previous command line

Discussion in 'Windows, Linux & Others on the Mac' started by kristenanne77, Sep 29, 2014.

  1. kristenanne77 macrumors regular

    Joined:
    Jul 16, 2009
    #1
    I am running DOS within windoz xp (bootcamped).
    (Thats the real boring black and white screen many of us grew up with)
    Within msdos, certain commands like cd (for change directory work fine), but I am trying to find the command to "get the previous dos command" so I don't have to type the whole line in again.
    I have tried the "up arrow" and various other things but cant get it to work.

    Does anyone know if it can be done within bootcamp?

    Thanks
    K
     
  2. saturnotaku macrumors 68000

    Joined:
    Mar 4, 2013
    #2
    Up arrow works fine here, at least when running command prompt as administrator.

    By the way, it's spelled "Windows." :rolleyes:
     
  3. macenied, Sep 29, 2014
    Last edited: Sep 29, 2014

    macenied macrumors 6502a

    macenied

    Joined:
    Aug 20, 2014
    #3
    Instead of "command.com" use "cmd.exe" as the command line interface. Then you can repeat the previous command with the <UP Arrow> or <F3> key.

    However, if you write Batch files you must take care about backwards compatibility. cmd.exe does support long filenames and white spaces in filenames, etc ..., command.com does not. So always test what you make by using command.com as well.
     
  4. kristenanne77 thread starter macrumors regular

    Joined:
    Jul 16, 2009
    #4
    I think its in command.com mode. I spent an hour trying to figure out why i could not open certain files but after renaming them to 8 or less letters, I was able to So i think i need to switch to the command.exe as mentioned.
    But when I type in command.exe on the command line to "switch over from command.com" I get an error saying
    "command.exe is not recognized as an internal or external command, operabe program or batch file". I even searched the computer (showing both hidden and unhidden files) and could not find it. What next?

    thanks
    K

    ----------

    Huh??? Are you seriouz? (sorry i couldn'r rezist)
     
  5. geoffm33 macrumors 6502

    geoffm33

    Joined:
    Dec 27, 2010
  6. kristenanne77 thread starter macrumors regular

    Joined:
    Jul 16, 2009
    #6
    YES! :p cmd.exe did it! :p
    I was able to change to a directory with a larger name!!
    (with cd .. etc)

    Thanks
    K
     
  7. iMacFarlane macrumors 65816

    iMacFarlane

    Joined:
    Apr 5, 2012
    Location:
    Adrift in a sea of possibilities
    #7
    Glad you got everything sorted out, but thought you should know:

    In MS-DOS, any "executable" program will work if you type the name, without the extension.

    Any .bat, .com, or .exe should work just fine without typing the .bat, .com, or .exe.

    In other words, you could just type "cmd" and it'll fire right up.
     
  8. drambuie macrumors 6502a

    Joined:
    Feb 16, 2010
    #8
    One thing with cmd.exe is that, like MS-DOS, it doesn't like commands with spaces in directory or file names or paths. It stops parsing at the first space. In cmd that is easily fixed by enclosing the entire path names you create in quotation marks. It will then parse the enclosed path, ignoring spaces.

    If you use the old method of substituting underscores for spaces, there's no problem. I always use underscores in path and file names, even in Windows Explorer.
     

Share This Page