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 6013 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?

                      Dias de verano

                      • Guest
                      Re: several DOS questions
                      « Reply #15 on: April 18, 2009, 11:58:52 AM »
                      Why do I get the feeling this is going to be a long one?

                      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 #16 on: April 18, 2009, 12:01:58 PM »
                      one can use the longhand chdir to change directories as well. try using chdir in place of cd. if that works, then their is something stopping the shorthand version from working. If not Dias is probably right regarding a corrupted cmd.exe.
                      I was trying to dereference Null Pointers before it was cool.

                      lehe

                        Topic Starter


                        Rookie

                        Re: several DOS questions
                        « Reply #17 on: April 18, 2009, 12:06:33 PM »
                        I don't think cd is an alias of something else,  as it works fine on directories of I: and C: disks until this I:\program_files case.  chdir works same as cd
                        Code: [Select]
                        I:\>chdir program_files
                        Invalid directory

                        Alithough mentioned already, I think still worth saying cd can work for a directory like I:\t_e but not for a directory like I:\eeeeeee_fffff.

                        I am not sure it is related that my I: disk is attached to a linux server via Network File System. So it is impossible to do chkdsk to my knowledge.

                        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 #18 on: April 18, 2009, 12:09:09 PM »
                        I don't think cd is an alias of something else,  as it works fine until this I:\program_files case.  chdir works same as cd
                        Code: [Select]
                        I:\>chdir program_files
                        Invalid directory

                        Alithough mentioned already, I think still worth saying cd can work for a directory like I:\t_e but not for a directory like I:\eeeeeee_fffff.

                        I am not sure it is related that my disk is attached to a linux server via Network File System. So it is impossible to do chkdsk to my knowledge.

                        weird, because on my computer I can cd to any directory regardless of the name. I think the fact that it is attached to a Linux server via NFS is extremely relevant. But I'm not to experienced with Linux Filesystems.
                        I was trying to dereference Null Pointers before it was cool.

                        Dias de verano

                        • Guest
                        Re: several DOS questions
                        « Reply #19 on: April 18, 2009, 12:14:37 PM »
                        I am not sure it is related that my disk is attached to a linux server via Network File System.

                        Now he tells us  ::)


                        squall_01



                          Prodigy

                          Thanked: 80
                          Re: several DOS questions
                          « Reply #20 on: April 18, 2009, 12:15:49 PM »
                          yeah  ::)
                          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 #21 on: April 18, 2009, 12:28:49 PM »
                            I am not sure if NFS is the issue. The same thing also happen on my local disk C. I.e., if I create C:\program_files, cd cannot change to it. Also cd can work for a directory like C:\t_e but not for a directory like C:\eeeeeee_fffff.

                            Dias de verano

                            • Guest
                            Re: several DOS questions
                            « Reply #22 on: April 18, 2009, 12:42:43 PM »
                            I am not sure if NFS is the issue. The same thing also happen on my local disk C. I.e., if I create C:\program_files, cd cannot change to it. Also cd can work for a directory like C:\t_e but not for a directory like C:\eeeeeee_fffff.


                            Are you using command or cmd?

                            lehe

                              Topic Starter


                              Rookie

                              Re: several DOS questions
                              « Reply #23 on: April 18, 2009, 12:50:48 PM »
                              I am using command.
                              Yeah, changing to cmd solve the problem!
                              So cmd is not DOS but command is?

                              Dias de verano

                              • Guest
                              Re: several DOS questions
                              « Reply #24 on: April 18, 2009, 01:15:35 PM »
                              I am using command.
                              Yeah, changing to cmd solve the problem!
                              So cmd is not DOS but command is?

                              At last.

                              Squall noticed this first. CMD.EXE is a 32 bit program. It's what you get when you select Command Prompt on the Windows Accessories menu. COMMAND.COM, on the other hand, exists only for compatibility and 16bit programs. It exists solely for those programs which have not been updated since the days of MS-DOS. It's designed to run 16bit applications, and operates just like the old MS-DOS did.
                              « Last Edit: April 18, 2009, 01:53:00 PM by Dias de verano »

                              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 #25 on: April 19, 2009, 11:11:31 AM »
                              In short- use cmd.
                              I was trying to dereference Null Pointers before it was cool.

                              squall_01



                                Prodigy

                                Thanked: 80
                                Re: several DOS questions
                                « Reply #26 on: April 19, 2009, 04:27:34 PM »
                                couldnt he go to start - accesories - cmd and work it just the same?
                                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