Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: several DOS questions  (Read 5978 times)

0 Members and 1 Guest are viewing this topic.

lehe

    Topic Starter


    Rookie

    several DOS questions
    « on: April 18, 2009, 10:21:23 AM »
    Hi,
    I have some problems for DOS.

    1. I have a directory I:\program_files
    I want to change to it, so I tried several ways but all failed
    Code: [Select]
    I:\>cd program_files
    Invalid directory

    2. is there any shortkey that can fetch the previous-typed command from history in command line window?

    3. is there any way to make select and copy easier to use in command line window?

    Thanks and regards!

    BC_Programmer


      Mastermind
    • Typing is no substitute for thinking.
    • Thanked: 1140
      • Yes
      • Yes
      • BC-Programming.com
    • Certifications: List
    • Computer: Specs
    • Experience: Beginner
    • OS: Windows 11
    Re: several DOS questions
    « Reply #1 on: April 18, 2009, 10:32:13 AM »
    1.Are you sure the directory name has an underscore (_) and not a space? If it's a space, you would need to enclose the name in quotes, like this:

    Code: [Select]

    cd "Program Files"


    2. use the up arrow key, or F3, to retrieve the last typed command. you can keep pressing the up arrow and down arrow keys to navigate amongst saved commands for that session..


    3. Not that I know of. I've never really had to copy and paste very frequently so Mark->Copy has always been enough for me.
    I was trying to dereference Null Pointers before it was cool.

    lehe

      Topic Starter


      Rookie

      Re: several DOS questions
      « Reply #2 on: April 18, 2009, 10:41:39 AM »
      Thank you!

      1. yes, I created a directory I:\program_files
      Code: [Select]
      I:\>dir program_files
       Volume in drive I is tingli
       Volume Serial Number is 0B05-09C6

       Directory of I:\program_files

      04/17/2009  05:57 PM    <DIR>          .
      04/17/2009  06:04 PM    <DIR>          ..
      03/01/2009  02:16 PM    <DIR>          ann_1.1.1
      04/17/2009  05:57 PM    <DIR>          Python-2.5.2
      03/29/2009  11:00 AM    <DIR>          gprof-helper
      03/29/2009  11:16 AM    <DIR>          datatool
      04/14/2009  06:13 PM    <DIR>          svm_light
      04/17/2009  03:28 PM    <DIR>          libsvm-2.89
                     0 File(s)              0 bytes
                     8 Dir(s)  1,006,499,233,792 bytes free

      I:\>cd program_files
      Invalid directory

      It seems that cd works fine for a directory like I:\t_e but not for a directory like I:\eeeeeee_fffff. 

      2. I tried arrow and F3 keys. None works as fetching previous command.
      « Last Edit: April 18, 2009, 10:54:03 AM by lehe »

      BC_Programmer


        Mastermind
      • Typing is no substitute for thinking.
      • Thanked: 1140
        • Yes
        • Yes
        • BC-Programming.com
      • Certifications: List
      • Computer: Specs
      • Experience: Beginner
      • OS: Windows 11
      Re: several DOS questions
      « Reply #3 on: April 18, 2009, 10:56:24 AM »
      try

      Code: [Select]
      cd Progr*

      Also- is this the commandline under window or a pure DOS environment? which version?
      I was trying to dereference Null Pointers before it was cool.

      lehe

        Topic Starter


        Rookie

        Re: several DOS questions
        « Reply #4 on: April 18, 2009, 11:05:37 AM »
        I am using the commandline under Windows XP Professional Version 2002.

        1. Guess you mean "progr*". Anyway not work either
        Code: [Select]
        I:\>cd progr*
        Invalid directory

        2. Although the up key and F3 cannot fetch previous command, I just found the right arrow key can get back the last command but that is the only command it can get.

        « Last Edit: April 18, 2009, 11:23:17 AM by lehe »

        squall_01



          Prodigy

          Thanked: 80
          Re: several DOS questions
          « Reply #5 on: April 18, 2009, 11:23:25 AM »
          I dont think that you can do that in dos.  You sure the 8.3 rule dont apply
          Windows 7 RC Tester.  Working on it.  Your monitor says etchasketch on the side!

          If I fall who is there to pick me up now.  I stand alone but I stand as the gaurdian for whom I wish to protect.  The sound of my blade utters my name as you fall.  For I shall not move.  For those that forsake the very people are wosres

          lehe

            Topic Starter


            Rookie

            Re: several DOS questions
            « Reply #6 on: April 18, 2009, 11:25:23 AM »
            what does "the 8.3 rule" mean?

            squall_01



              Prodigy

              Thanked: 80
              Re: several DOS questions
              « Reply #7 on: April 18, 2009, 11:27:11 AM »
              eight characters three extension
              Windows 7 RC Tester.  Working on it.  Your monitor says etchasketch on the side!

              If I fall who is there to pick me up now.  I stand alone but I stand as the gaurdian for whom I wish to protect.  The sound of my blade utters my name as you fall.  For I shall not move.  For those that forsake the very people are wosres

              Dias de verano

              • Guest
              Re: several DOS questions
              « Reply #8 on: April 18, 2009, 11:43:04 AM »
              eight characters three extension

              does not apply in xp.

              maybe you should do a chkdsk

              you can press the TAB key to get command completion, so in I:\ what happens if you type cd pro and then press tab?



              lehe

                Topic Starter


                Rookie

                Re: several DOS questions
                « Reply #9 on: April 18, 2009, 11:45:34 AM »
                Are you assuming program_files is a file? It is a directory and has no extension...

                When typing cd_pro, pressing tab will just move the curser several spaces ahead, not doing completion job.

                squall_01



                  Prodigy

                  Thanked: 80
                  Re: several DOS questions
                  « Reply #10 on: April 18, 2009, 11:47:13 AM »
                  really at the very least I thought that he would need ""
                  Windows 7 RC Tester.  Working on it.  Your monitor says etchasketch on the side!

                  If I fall who is there to pick me up now.  I stand alone but I stand as the gaurdian for whom I wish to protect.  The sound of my blade utters my name as you fall.  For I shall not move.  For those that forsake the very people are wosres

                  lehe

                    Topic Starter


                    Rookie

                    Re: several DOS questions
                    « Reply #11 on: April 18, 2009, 11:50:45 AM »
                    "" not work either
                    Code: [Select]
                    I:\>cd "program_files"
                    Parameter format not correct -  "program_files"

                    Dias de verano

                    • Guest
                    Re: several DOS questions
                    « Reply #12 on: April 18, 2009, 11:51:33 AM »
                    really at the very least I thought that he would need ""

                    no spaces, no need for quotes.

                    Dias de verano

                    • Guest
                    Re: several DOS questions
                    « Reply #13 on: April 18, 2009, 11:53:01 AM »
                    "" not work either
                    Code: [Select]
                    I:\>cd "program_files"
                    Parameter format not correct -  "program_files"

                    Possibly your disk is scrambled. Or cmd.exe is corrupted.

                    can you cd to any folder at all (e.g. on other disks)?


                    Reno



                      Hopeful
                    • Thanked: 32
                      Re: several DOS questions
                      « Reply #14 on: April 18, 2009, 11:55:58 AM »
                      Code: [Select]
                      I:\>cd program_files
                      Invalid directory

                      C:\>cd non_existent_directory
                      The system cannot find the path specified.

                      do you by any chance have cd.exe, cd.com, cd.bat, cd.cmd at I drive or in one of the %path% directory?