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

generate directorories names from .txt file

Expand Messages
  • Mike Breiding - Morgantown WV
    Greetings, Does anyone know of a way to auto generate directories by using a .txt file as a source for the dir names? Such as a list of US state names of
    Message 1 of 7 , May 17, 2014
      Greetings,
      Does anyone know of a way to auto generate directories by using a .txt
      file as a source for the dir names?

      Such as a list of US state names of counties.
      -Mike

      ---
      This email is free from viruses and malware because avast! Antivirus protection is active.
      http://www.avast.com
    • Ray Shapp
      Hi Mike, Why not place all the new directory names into a batch file? Here s an example: I placed the following text into a file, and saved it as *MakeDir.bat*
      Message 2 of 7 , May 17, 2014
        Hi Mike,

        Why not place all the new directory names into a batch file?

        Here's an example:

        I placed the following text into a file, and saved it as MakeDir.bat

        md dd1
        md dd2
        md dd3

        Then open a console window (Ctrl+R then enter CMD). Then enter the fully qualified batch file name. In my case, I had stored MakeDir.bat into the root of the C drive, therefore to run it, I entered C:\makedir

        This produced three new directories in C:\Users\RAS  (Note: RAS is my user directory).

        HTH

        Ray Shapp
        ---


        On Sat, May 17, 2014 at 10:15 AM, Mike Breiding - Morgantown WV mike@... [ntb-OffTopic] <ntb-OffTopic@yahoogroups.com> wrote:
         


        Greetings,
        Does anyone know of a way to auto generate directories by using a .txt
        file as a source for the dir names?

        Such as a list of US state names of counties.
        -Mike

        ---
        This email is free from viruses and malware because avast! Antivirus protection is active.
        http://www.avast.com


      • Mike Breiding - Morgantown WV
        ... I appreicate the example below. But, what I was hoping to avoid was entering the name of each directory manually. Thanks, Ray. -Mike ... This email is free
        Message 3 of 7 , May 17, 2014
          On 5/17/2014 10:52 AM, Ray Shapp rayshapp@... [ntb-OffTopic] wrote:
          > Hi Mike,
          > Why not place all the new directory names into a batch file?

          I appreicate the example below. But, what I was hoping to avoid was
          entering the name of each directory manually.

          Thanks, Ray.
          -Mike


          > Here's an example:
          >
          > I placed the following text into a file, and saved it as *MakeDir.bat*
          >
          > md dd1
          > md dd2
          > md dd3
          >
          > Then open a console window (*Ctrl+R* then enter *CMD*). Then enter the
          > fully qualified batch file name. In my case, I had stored *MakeDir.bat*
          > into the root of the C drive, therefore to run it, I entered *C:\makedir*
          >
          > This produced three new directories in *C:\Users\RAS* (Note: *RAS* is
          > my user directory).
          >
          > HTH
          >
          > Ray Shapp
          > ---
          >
          >
          > On Sat, May 17, 2014 at 10:15 AM, Mike Breiding - Morgantown WV
          > mike@... [ntb-OffTopic] <ntb-OffTopic@yahoogroups.com
          > <mailto:ntb-OffTopic@yahoogroups.com>> wrote:
          >
          > __
          >
          >
          > Greetings,
          > Does anyone know of a way to auto generate directories by using a .txt
          > file as a source for the dir names?
          >
          > Such as a list of US state names of counties.
          > -Mike
          >

          ---
          This email is free from viruses and malware because avast! Antivirus protection is active.
          http://www.avast.com
        • Axel Berger
          ... Using ^!MkDir DirName you can do it entirly within Clips. The first step, taking a list of names and making it a list of commands is a trivial exercise.
          Message 4 of 7 , May 17, 2014
            "Ray Shapp rayshapp@... [ntb-OffTopic]" wrote:
            > I placed the following text into a file, and saved it as MakeDir.bat
            > md dd1
            > md dd2
            > md dd3

            Using "^!MkDir DirName" you can do it entirly within Clips.
            The first step, taking a list of names and making it a list of commands is
            a trivial exercise. Your suggestion of a batch has the advantage that you
            can also save it and call it from within a single clip. The list ought to
            be preceded by a CD to the desired base directory.

            Axel
          • Axel Berger
            Mike Breiding - Morgantown WV mike@WildWonderfulWV.us [ntb-OffTopic] ... Assuming you already have a list, one name per line: ^!Replace ^(.+)$ MD $1
            Message 5 of 7 , May 17, 2014
              "Mike Breiding - Morgantown WV mike@... [ntb-OffTopic]"
              wrote:
              > what I was hoping to avoid was
              > entering the name of each directory manually.

              Assuming you already have a list, one name per line:

              ^!Replace "^(.+)$" >> "MD $1" WRASTI

              or possibly

              ^!Replace "^([^ ]+)$" >> "MD $1" WRASTI

              Axel
            • Greg Chapman
              Hi Mike, On 17 May 14 16:25 Mike Breiding - Morgantown WV mike@WildWonderfulWV.us [ntb-OffTopic] ... Surely, it s not beyond
              Message 6 of 7 , May 17, 2014
                Hi Mike,

                On 17 May 14 16:25 "Mike Breiding - Morgantown WV
                mike@... [ntb-OffTopic]" <ntb-OffTopic@yahoogroups.com>
                said:
                > I appreicate the example below. But, what I was hoping to avoid was
                > entering the name of each directory manually.
                >
                > > Here's an example:
                > >
                > > I placed the following text into a file, and saved it as
                > *MakeDir.bat*
                > >
                > > md dd1
                > > md dd2
                > > md dd3

                Surely, it's not beyond the wit of a Notetabber to find a one-per-line
                list of states put it in a text file and add "md " in front of it!

                And if States was not really the example you had in mind then sure'y
                you'll either have generated the list you require yourself somewhere
                or someone else will have posted the one you require on the Internet.

                Greg
              • Mike Breiding - Morgantown WV
                On 5/17/2014 11:50 AM, Greg Chapman gregchapmanuk@yahoo.co.uk ... Yes! Now I GROK! It worked just fine. Only error I got was for Virginia because I did not
                Message 7 of 7 , May 17, 2014
                  On 5/17/2014 11:50 AM, Greg Chapman gregchapmanuk@...
                  [ntb-OffTopic] wrote:
                  > Hi Mike,
                  >
                  > On 17 May 14 16:25 "Mike Breiding - Morgantown WV
                  > mike@... [ntb-OffTopic]" <ntb-OffTopic@yahoogroups.com>
                  > said:
                  > > I appreicate the example below. But, what I was hoping to avoid was
                  > > entering the name of each directory manually.
                  > >
                  > > > Here's an example:
                  > > > I placed the following text into a file, and saved it as
                  > > *MakeDir.bat*
                  > > > md dd1
                  > > > md dd2
                  > > > md dd3
                  >
                  > Surely, it's not beyond the wit of a Notetabber to find a one-per-line
                  > list of states put it in a text file and add "md " in front of it!
                  >
                  > And if States was not really the example you had in mind then sure'y
                  > you'll either have generated the list you require yourself somewhere
                  > or someone else will have posted the one you require on the Internet. -Greg


                  Yes! Now I GROK!
                  It worked just fine.
                  Only error I got was for "Virginia" because I did not underscore "West
                  Virginia"
                  The solution was too simple for my simple brain!
                  And, what a novelty to be back at the cmd line...

                  Thanks to all.
                  -Mike


                  >

                  ---
                  This email is free from viruses and malware because avast! Antivirus protection is active.
                  http://www.avast.com
                Your message has been successfully submitted and would be delivered to recipients shortly.