Loading ...
Sorry, an error occurred while loading the content.

Re: [Clip] Re: ^!MkDir

Expand Messages
  • loro
    ... Thanks. ... Actually, creating a chain of new directories works both with command.com and cmd.exe here. Lotta
    Message 1 of 21 , Feb 3, 2010
    • 0 Attachment
      Axel wrote:
      > > If I want this to be compatible with Win9*,
      > > would I need to use a DOS short name?
      >
      >No, DOS 7.0, the one that comes with Win98 can deal with long names on
      >its own.


      Thanks.

      >But it is one directory at a time, both in plain command.com and in
      >4DOS. The latter is free now and highly recommended BTW.

      Actually, creating a chain of new directories works both with
      command.com and cmd.exe here.

      Lotta
    • loro
      ... Good. ... Not at all. I found it most helpful and it solved my problem. I m not complaing. :-) ... I don t mind using something outside NTP as long as it
      Message 2 of 21 , Feb 3, 2010
      • 0 Attachment
        diodeom wrote:
        >Sorry, Lotta; to add to your 2K/XP empirical evidence I can only
        >contribute this: it works on ^%expletive% Vista too.

        Good.

        >And I hope you didn't read my original preamble as facetious.

        Not at all. I found it most helpful and it solved my problem. I'm not
        complaing. :-)

        >I wholeheartedly empathize with the desire to do things purely* in
        >NT, even just to see if it's doable. (If I could**, I would have
        >Clips process my laundry too! :)

        I don't mind using something outside NTP as long as it can be
        incorporated in a clip. I'm fiddling with something I may share with
        a friend who's even more retarded than me and tends to mess up big
        time if things don't work as expected, that's why I try to confirm it
        will work on her old 98 box. And yes, like you I like to know if
        things can be done with NTP.

        >*/ In case of ^!MkDir one could maybe argue (I think Alec hints on
        >that) that NT's own scripting merely serves as a middle-man to cmd anyway.

        Probably for these kind of things, yes.

        Since we are all DOS retards here, Axel excluded, I want to share
        something I learnt by spending 5 minutes glancing in my DOS book.
        There are keyboard shortcuts for the prompt. Found a page here:
        <http://www.labnol.org/software/tutorials/useful-keyboard-shortcuts-for-the-dos-command-prompt-in-windows/2629/>.
        Try for instance F3 out after you have run a few commands. My god,
        the trouble I've had to copy a command so I can repeat it without
        typing (I'm a lousy typist too). No one ever told me these things!
        Yeah, you probably knew already, but I bet I'm not the only one who
        didn't. They hide the good stuff...

        Lotta
      • loro
        ... F3 is good too, but I actually meant F7 (ack, my memory isn t too god either). Sweet as honey, F7. Yeah, now it s OT. Sorry. Lotta
        Message 3 of 21 , Feb 3, 2010
        • 0 Attachment
          I wrote:
          >Try for instance F3 out after you have run a few commands.

          F3 is good too, but I actually meant F7 (ack, my memory isn't too god
          either). Sweet as honey, F7.

          Yeah, now it's OT. Sorry.
          Lotta
        • John Shotsky
          To repeat commands in a DOS box, use up and down arrows. Simply scroll to the command you want to (re)execute, change it if necessary, and hit enter. I started
          Message 4 of 21 , Feb 3, 2010
          • 0 Attachment
            To repeat commands in a DOS box, use up and down arrows. Simply scroll to the command you want to (re)execute, change it
            if necessary, and hit enter. I started with DOS before there was MS Dos. CPM. I still have my old DOS 5 bible, and one
            for XP also. J (But my 4-floppy Kaypro is long gone. (1983)). We used to have to write our own drivers for modems, etc.
            And we used BBS systems, which were all dial up.THANKS MICROSOFT, for standardizing things!



            Regards,

            John



            From: ntb-clips@yahoogroups.com [mailto:ntb-clips@yahoogroups.com] On Behalf Of loro
            Sent: Wednesday, February 03, 2010 7:41 PM
            To: ntb-clips@yahoogroups.com
            Subject: Re: [Clip] Re: ^!MkDir





            diodeom wrote:
            >Sorry, Lotta; to add to your 2K/XP empirical evidence I can only
            >contribute this: it works on ^%expletive% Vista too.

            Good.

            >And I hope you didn't read my original preamble as facetious.

            Not at all. I found it most helpful and it solved my problem. I'm not
            complaing. :-)

            >I wholeheartedly empathize with the desire to do things purely* in
            >NT, even just to see if it's doable. (If I could**, I would have
            >Clips process my laundry too! :)

            I don't mind using something outside NTP as long as it can be
            incorporated in a clip. I'm fiddling with something I may share with
            a friend who's even more retarded than me and tends to mess up big
            time if things don't work as expected, that's why I try to confirm it
            will work on her old 98 box. And yes, like you I like to know if
            things can be done with NTP.

            >*/ In case of ^!MkDir one could maybe argue (I think Alec hints on
            >that) that NT's own scripting merely serves as a middle-man to cmd anyway.

            Probably for these kind of things, yes.

            Since we are all DOS retards here, Axel excluded, I want to share
            something I learnt by spending 5 minutes glancing in my DOS book.
            There are keyboard shortcuts for the prompt. Found a page here:
            <http://www.labnol.org/software/tutorials/useful-keyboard-shortcuts-for-the-dos-command-prompt-in-windows/2629/>.
            Try for instance F3 out after you have run a few commands. My god,
            the trouble I've had to copy a command so I can repeat it without
            typing (I'm a lousy typist too). No one ever told me these things!
            Yeah, you probably knew already, but I bet I'm not the only one who
            didn't. They hide the good stuff...

            Lotta





            [Non-text portions of this message have been removed]
          • Axel Berger
            ... Yes and with 4DOS too, but not DOS 7.0 and earlier. Axel
            Message 5 of 21 , Feb 3, 2010
            • 0 Attachment
              John Shotsky wrote:
              > To repeat commands in a DOS box, use up and down arrows.

              Yes and with 4DOS too, but not DOS 7.0 and earlier.

              Axel
            • Axel Berger
              ... Yes, that s why I tried it out in Win98 for you (relying on an old man s memory like mine is a mug s game). Didn t work. One after the other went fine.
              Message 6 of 21 , Feb 3, 2010
              • 0 Attachment
                loro wrote:
                > Actually, creating a chain of new directories works both with
                > command.com and cmd.exe here.

                Yes, that's why I tried it out in Win98 for you (relying on an old man's
                memory like mine is a mug's game). Didn't work. One after the other went
                fine.

                Axel
              • Al
                ... Y all got me curious. this here O.S. that don t use drive letters but instead uses things like /home sh bash (shells. there s no command.com or cmd.exe)
                Message 7 of 21 , Feb 3, 2010
                • 0 Attachment
                  loro wrote:
                  > Actually, creating a chain of new directories works both with
                  > command.com and cmd.exe here.
                  >
                  Y'all got me curious. this here O.S. that don't use drive letters but
                  instead uses things like /home

                  sh

                  bash

                  (shells. there's no command.com or cmd.exe)

                  mkdir

                  for make one at a time. But also has mkdirhier (make_dir_hierarchy).
                  Makes unlimited levels deep (except eventually limited by ram and
                  computer's resources)

                  al@P5Q:~/temp/tst$ mkdirhier ./new1/new2/new3
                  al@P5Q:~/temp/tst$ ls
                  new1/
                  al@P5Q:~/temp/tst$ pwd
                  /home/al/temp/tst
                  al@P5Q:~/temp/tst$ cd ./new1/new2/new3
                  al@P5Q:~/temp/tst/new1/new2/new3$ pwd
                  /home/al/temp/tst/new1/new2/new3
                  al@P5Q:~/temp/tst/new1/new2/new3$
                • loro
                  ... Ah, I didn t understand that. Thank you. Lotta
                  Message 8 of 21 , Feb 4, 2010
                  • 0 Attachment
                    Axel Berger wrote:
                    >loro wrote:
                    > > Actually, creating a chain of new directories works both with
                    > > command.com and cmd.exe here.
                    >
                    >Yes, that's why I tried it out in Win98 for you (relying on an old man's
                    >memory like mine is a mug's game). Didn't work. One after the other went
                    >fine.

                    Ah, I didn't understand that. Thank you.

                    Lotta
                  • Alec Burgess
                    This is an interesting thread though getting close to off-topic now. :-) (though all of the stuff we re talking about CAN be run from an NTB clip) I m running
                    Message 9 of 21 , Feb 4, 2010
                    • 0 Attachment
                      This is an interesting thread though getting close to off-topic now. :-)
                      (though all of the stuff we're talking about CAN be run from an NTB clip)

                      I'm running WinXP and have cygwin and UnxUtils installed. I can't find
                      any mkdirhier *BUT* when I check help for cygwin's mkdir I get:
                      > sh-3.2$ mkdir --help
                      > Usage: mkdir [OPTION] DIRECTORY...
                      > Create the DIRECTORY(ies), if they do not already exist.
                      >
                      > Mandatory arguments to long options are mandatory for short options too.
                      > -m, --mode=MODE set file mode (as in chmod), not a=rwx - umask
                      > -p, --parents no error if existing, make parent directories as
                      > needed
                      > -v, --verbose print a message for each created directory
                      > -Z, --context=CTX set the SELinux security context of each created
                      > directory to CTX
                      > --help display this help and exit
                      > --version output version information and exit
                      so the --parents argument appears to be what Lotta originally wanted.
                      Note: that (afaict) executing mkdir at cmd prompt uses the (native) DOS
                      mkdir while entering 'bash' or 'sh' (ie. one of the unix shells) at
                      that command prompt ... then ... mkdir executes the cygwin or UnxUtils
                      mkdir.exe

                      so that gives us about 100 different ways to skin the cat :-)

                      Al - if you do mkdir --help do you have the -p option?

                      Al wrote:
                      > loro wrote:
                      >
                      >> Actually, creating a chain of new directories works both with
                      >> command.com and cmd.exe here.
                      >>
                      >>
                      > Y'all got me curious. this here O.S. that don't use drive letters but
                      > instead uses things like /home
                      >
                      > sh
                      >
                      > bash
                      >
                      > (shells. there's no command.com or cmd.exe)
                      >
                      > mkdir
                      >
                      > for make one at a time. But also has mkdirhier (make_dir_hierarchy).
                      > Makes unlimited levels deep (except eventually limited by ram and
                      > computer's resources)
                      >
                      > al@P5Q:~/temp/tst$ mkdirhier ./new1/new2/new3
                      > al@P5Q:~/temp/tst$ ls
                      > new1/
                      > al@P5Q:~/temp/tst$ pwd
                      > /home/al/temp/tst
                      > al@P5Q:~/temp/tst$ cd ./new1/new2/new3
                      > al@P5Q:~/temp/tst/new1/new2/new3$ pwd
                      > /home/al/temp/tst/new1/new2/new3
                      > al@P5Q:~/temp/tst/new1/new2/new3$
                      >
                      >
                      >
                      >

                      --
                      Regards ... Alec (buralex@gmail & WinLiveMess - alec.m.burgess@skype)



                      [Non-text portions of this message have been removed]
                    • Hugo Paulissen
                      Hi, This looks as an elegant solution, and is not too much OT.
                      Message 10 of 21 , Feb 4, 2010
                      • 0 Attachment
                        Hi,

                        This looks as an elegant solution, and is not too much OT.

                        http://www.dq.winsila.com/tips-tricks/productivity-tips/creating-multiple-sub-folders-using-mkdir-from-a-command-prompt.html

                        Hugo





                        ________________________________
                        From: Alec Burgess <buralex@...>
                        To: ntb-clips@yahoogroups.com
                        Sent: Thu, February 4, 2010 3:39:05 PM
                        Subject: Re: [Clip] Re: ^!MkDir


                        This is an interesting thread though getting close to off-topic now. :-)
                        (though all of the stuff we're talking about CAN be run from an NTB clip)

                        I'm running WinXP and have cygwin and UnxUtils installed. I can't find
                        any mkdirhier *BUT* when I check help for cygwin's mkdir I get:
                        > sh-3.2$ mkdir --help
                        > Usage: mkdir [OPTION] DIRECTORY...
                        > Create the DIRECTORY(ies) , if they do not already exist.
                        >
                        > Mandatory arguments to long options are mandatory for short options too.
                        > -m, --mode=MODE set file mode (as in chmod), not a=rwx - umask
                        > -p, --parents no error if existing, make parent directories as
                        > needed
                        > -v, --verbose print a message for each created directory
                        > -Z, --context=CTX set the SELinux security context of each created
                        > directory to CTX
                        > --help display this help and exit
                        > --version output version information and exit
                        so the --parents argument appears to be what Lotta originally wanted.
                        Note: that (afaict) executing mkdir at cmd prompt uses the (native) DOS
                        mkdir while entering 'bash' or 'sh' (ie. one of the unix shells) at
                        that command prompt ... then ... mkdir executes the cygwin or UnxUtils
                        mkdir.exe

                        so that gives us about 100 different ways to skin the cat :-)

                        Al - if you do mkdir --help do you have the -p option?

                        Al wrote:
                        > loro wrote:
                        >
                        >> Actually, creating a chain of new directories works both with
                        >> command.com and cmd.exe here.
                        >>
                        >>
                        > Y'all got me curious. this here O.S. that don't use drive letters but
                        > instead uses things like /home
                        >
                        > sh
                        >
                        > bash
                        >
                        > (shells. there's no command.com or cmd.exe)
                        >
                        > mkdir
                        >
                        > for make one at a time. But also has mkdirhier (make_dir_hierarchy ).
                        > Makes unlimited levels deep (except eventually limited by ram and
                        > computer's resources)
                        >
                        > al@P5Q:~/temp/ tst$ mkdirhier ./new1/new2/ new3
                        > al@P5Q:~/temp/ tst$ ls
                        > new1/
                        > al@P5Q:~/temp/ tst$ pwd
                        > /home/al/temp/ tst
                        > al@P5Q:~/temp/ tst$ cd ./new1/new2/ new3
                        > al@P5Q:~/temp/ tst/new1/ new2/new3$ pwd
                        > /home/al/temp/ tst/new1/ new2/new3
                        > al@P5Q:~/temp/ tst/new1/ new2/new3$
                        >
                        >
                        >
                        >

                        --
                        Regards ... Alec (buralex@gmail & WinLiveMess - alec.m.burgess@ skype)

                        [Non-text portions of this message have been removed]







                        [Non-text portions of this message have been removed]
                      • Al
                        Alec Burgess wrote: ... Yours didn t (go OT) cause I guess you can use Notetab to run your Cygwin bash shell. BTW I used to run
                        Message 11 of 21 , Feb 4, 2010
                        • 0 Attachment
                          Alec Burgess wrote:

                          <snip has cygwin on Win XP>
                          > Al - if you do mkdir --help do you have the -p option?
                          >
                          Yours didn't (go OT) 'cause I guess you can use Notetab to run your
                          Cygwin bash shell. BTW I used to run Cygwin (which has a rather
                          powerful bash shell, BTW). But see my "sys" a few paragraphs down, I no
                          longer have a need for Cygwin.

                          Mine post here speaks not of Notetab but of "program able" and mkdir as
                          relative to the bash shell.

                          So, as courtesy, I would go to Off Topic list if/with yet any further in
                          this "program able" vein that is or falls outside of the realm of
                          Notetab and DOS or the program able Notetab editor. Thank you.

                          al@P5Q:~$ cat /etc/slackware-version
                          Slackware 12.2.0
                          al@P5Q:~$

                          Yep, mkdir -p (So I have at least 2 different ways to do it natively
                          already onboard my sys) (ha ha, I got Win beat <grin>) -- my sys is
                          Slackware 12.2 with the KDE desktop. On this sys is also the KVM virtual
                          machine in which, amongst others, I have a Win XP and a Win 7 (which, at
                          my whim) I may run and also I may use in said virtual machine. (I do
                          have Notetab on that Win which runs in KVM).

                          On my sys mkdir is a binary executable (the Linux equvalent of a Win
                          .exe file) (Linux does not use file extensions which is a Win thing)

                          al@P5Q:/bin$ lsag mkdir
                          -rwxr-xr-x 1 root root 30968 2008-09-20 20:18 mkdir*
                          al@P5Q:/bin$ pwd
                          /bin
                          al@P5Q:/bin$


                          note: in next, the 1st ls returned nothing which means tst is an empty dir
                          until we run the mkdir -p command and then ls now reveals sub folder(s)

                          al@P5Q:~/temp/tst$ ls
                          al@P5Q:~/temp/tst$ mkdir -p ./test1/test2/test3
                          al@P5Q:~/temp/tst$ ls
                          test1/
                          al@P5Q:~/temp/tst$ cd test1/test2/test3
                          al@P5Q:~/temp/tst/test1/test2/test3$ pwd
                          /home/al/temp/tst/test1/test2/test3
                          al@P5Q:~/temp/tst/test1/test2/test3$


                          on my sys, mkdirhier is a sh (shell script). Just as DOS is scriptable,
                          as Hugo pointed out, so is the Linux bash shell
                          (scriptable/programmable) very much so.

                          So, program able Notetab editor, program able DOS, program able bash shell.


                          al@P5Q:~$ which mkdirhier
                          /usr/bin/mkdirhier

                          al@P5Q:~$ cat /usr/bin/mkdirhier
                          #!/bin/sh
                          # $Xorg: mkdirhier.sh,v 1.3 2000/08/17 19:41:53 cpqbld Exp $
                          # Courtesy of Paul Eggert

                          newline='

                          <snip various case scenarios (protections against idiot user or
                          keyboarding mistake)>
                          <y'all don't want a bunch of new lines as a folder name on your hard
                          drive, right?>

                          # next, can seen the for loop that does the actual duty
                          # It's much like the for loop that Hugo pointed out, DOS script style
                          # but this is a bash script, not a DOS batch file

                          for filename
                          do
                          path=$prefix$filename
                          prefix=$path/
                          shift

                          test -d "$path" || {
                          paths=$path
                          for filename
                          do
                          if [ -n "$filename" -a "$filename" != "." ]; then
                          path=$path/$filename
                          paths=$paths$newline$path
                          fi
                          done

                          mkdir $paths || status=$?

                          break
                          }
                          done
                          done

                          exit $status
                          # end

                          Alan.
                        • Al
                          FWIW Win XP (mkdir /?) command console (cmd.exe I guess) whether or not extensions are installed makes a difference. next (500KB file size) is a screen shot
                          Message 12 of 21 , Feb 5, 2010
                          • 0 Attachment
                            FWIW

                            Win XP (mkdir /?) command console (cmd.exe I guess) "whether or not
                            extensions are installed" makes a difference.

                            next (500KB file size) is a screen shot of mkdir help (mkdir /?) from
                            Win XP command console

                            http://spiffyminer.tripod.com/mkdir_com.htm

                            Additionally, said help reports "if extensions are installed"

                            My bash mkdirhier and the content of web page Hugo pointed out, each
                            could be considered an extension.

                            And, how these "extend" is that these are script/batch_file that extends
                            the capability of a built in command (via the use of for loop, etc. so
                            as to gain even greater functionality).

                            My guess is that the "extensions" mentioned on the mkdir help screen may
                            be batch files or similar script files by Microsoft.

                            Alan.
                          Your message has been successfully submitted and would be delivered to recipients shortly.