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

Re:[Clip] Array file launch

Expand Messages
  • Elizabeth Wild
    I am not sure that exactly what you are trying to do, so this may not be useful to you. I have several clips where I want open everything with the name
    Message 1 of 9 , Dec 8, 2000
    • 0 Attachment
      I am not sure that exactly what you are trying to do, so this may not be useful to you.

      I have several clips where I want open everything with the name CRW1208m no matter what the document extension is. The report generator names the files in this
      format and then uses different extesions to seperate them. I do this with the following bit of code.

      ^!Open CRW1208m.* ----- Actually I stick the GetDate function in the middle so the the report is dynamic.

      It seems that you could do something similar, but with the wildcard in front and the static extension in the back (^!Open *.eml). I don't use the shell command so I
      don't know if this would work in conjunction with that.

      Hope it helps
      Elizabeth Wild

      Original message from: Alan
      >Hi,
      >
      >Can a clip accomplish the following? If so, how?
      >
      >Within my NoteTab's documents directory:
      >
      >all files that have a certain file extension, I want these particular files
      >launched (the amount of these particular files could vary from one to
      >approximately not much more than about four files)
      >
      >^!Shell "C:\Program Files\NoteTab Pro\Documents\EmailFil01.eml" will
      >launch one file
      >
      >But I may have: EmailFil01.eml, EmailFil02.eml, EmailFil03.eml,
      >EmailFil04.eml (four files)
      >
      >
      >As far as the clip goes:
      >
      >I would guess that according to the specific file extension (.eml), first
      >gather the files into an array?
      >
      >But then, ^!Shell will launch each individual file, I already tried it.
      >
      >But, how to have ^!Shell to (act on one at a time) in succession get each
      >file launched that is from the array, say if there are three or four files
      >of the specified file extension type??
      >
      >Thanks. Regards. Alan.
      >
      >
      >
      >
      >
    • Alan
      Hi Elizabeth, all, ... useful to you. Well, thanks, but ^!Open not do it. I was thinking more along the lines of array. Then, after having gathered the files
      Message 2 of 9 , Dec 8, 2000
      • 0 Attachment
        Hi Elizabeth, all,

        >I am not sure that exactly what you are trying to do, so this may not be
        useful to you.

        Well, thanks, but ^!Open not do it.

        I was thinking more along the lines of array.

        Then, after having gathered the files into an array, to loop and use Shell
        command on #1 file taken from the array. then to loop again and use Shell
        command on #2 file taken from the array. And, repeat this loop until all
        files from the array have been treated in like manner.

        It seems to me that (repeat loops as above so as to be able to run Shell
        command on each individual file from an array of files) may very well be
        possible to do. But, since I am still cutting my teeth so to speak on
        writing clips, it's getting towards advanced or else is advanced clip
        writing. Eventually I could figure it out on my own.

        But I thought I might ask for hints or assistance to help expedite my
        figuring it out.

        Thanks. Alan.
      • Alan
        Hi :-) Yes it works. I went looked at my archives from this clips list. (I finally learned how to archive ie getting the beginnings of a good database for
        Message 3 of 9 , Dec 10, 2000
        • 0 Attachment
          Hi :-)

          Yes it works. I went looked at my archives from this clips list. (I
          finally learned how to archive ie getting the beginnings of a good database
          for myself to refer to)

          The former thread "Span through subdirectories"

          Using that clip, all I did was change a few small parts, I used Shell
          instead of copy, and I eliminated destination. And I used Ntab's doc dir
          for path to my files.

          Question: Can I have the wizard come up with all of the files already
          checked so that I do not have to select or check the files? How?

          Thanks. And thanks to all who have been my teachers. Alan.

          H="Run EML files"
          ;10-16-2000
          ^!Set %Files%=^$GetDocumentPath$
          ^!SetListDelimiter |
          ^!SetArray %FileList%=^$GetFiles("+^%Files%";*.eml)$
          ^!Set %FileList%=^?{(T=A;H=40)Select files to run==^%FileList%}
          ^!Set %FileList%=^$StrReplace("|";"^p";"^%FileList%";0;0)$
          ^!SetListDelimiter ^p
          ^!SetArray %FileList%=^%FileList%
          ^!Set %Count%=^%FileList0%
          ^!Set %Index%=0
          :Loop
          ^!Inc %Index%
          ^!If ^%Index% > ^%Count% End
          ^!Shell "^%FileList^%Index%%"
          ^!Delay 5
          ^!Goto Loop
          ;--<end of clip<<
        • Jody
          Hi Alan, ... Yes, it is all done including the below in my DirStuff. You just need to change file types, etc. There are a whole mess of Clips in it to do
          Message 4 of 9 , Dec 10, 2000
          • 0 Attachment
            Hi Alan,

            >Question: Can I have the wizard come up with all of the files already
            >checked so that I do not have to select or check the files? How?

            Yes, it is all done including the below in my DirStuff. You just
            need to change file types, etc. There are a whole mess of Clips
            in it to do various things with directories and do a lot of
            different tasks. You can probably find examples of just about
            anything in it.

            http://www.notetab.net/zip/dirstuff.zip

            H=Run EML files
            ;10-16-2000
            ^!Set %Files%=^$GetDocumentPath$
            ^!SetListDelimiter |_
            ^!SetArray %FileList%=^$GetFiles("+^%Files%";*.txt)$
            ^!Set %FileList%=^?{(T=A;H=40)Select files to run==^%FileList%}
            ^!Set %FileList%=^$StrReplace("|";"^p";"^%FileList%";0;0)$
            ^!SetListDelimiter ^p
            ^!SetArray %FileList%=^%FileList%
            ^!Set %Count%=^%FileList0%
            ^!Set %Index%=0
            :Loop
            ^!Inc %Index%
            ^!If ^%Index% > ^%Count% End
            ^!Shell "^%FileList^%Index%%"
            ^!Delay 5
            ^!Goto Loop

            Happy Clip'n!
            Jody

            http://www.notetab.net

            Subscribe, UnSubscribe, Options
            mailto:Ntb-Clips-Subscribe@...
            mailto:Ntb-Clips-UnSubscribe@...
            http://www.egroups.com/group/ntb-clips
          • Jody
            Hi Alan, P.S. Alan, in case you missed it, I added the underscore as part of the delimiter. I ll bill you for knowing where to put the mark. ;) (It was from
            Message 5 of 9 , Dec 10, 2000
            • 0 Attachment
              Hi Alan,

              P.S. Alan, in case you missed it, I added the underscore as part
              of the delimiter. I'll bill you for knowing where to put the
              mark. ;) (It was from a joke thing I sent out on Clean-Funnies. :)


              >^!Set %Files%=^$GetDocumentPath$
              >^!SetListDelimiter |_



              See ya in the funnies!
              Jody Adair

              Clean-Funnies
              mailto:c-f@...?Subject=subscribe

              If you haven't laughed at yourself today,
              you missed a good joke!
            • Alan
              Hi Jody, ... Is that the French mark or the English pound I think in $monetary$ units once in a while for a reason that escapes me at the moment. And, what,
              Message 6 of 9 , Dec 11, 2000
              • 0 Attachment
                Hi Jody,

                >of the delimiter. I'll bill you for knowing where to put the
                >mark. ;) (It was from a joke thing I sent out on Clean-Funnies. :)

                Is that the French mark or the English pound I think in $monetary$ units
                once in a while for a reason that escapes me at the moment. And, what, me
                to be billed for my knowledge -> usually 't other way around, usually the
                one that has the knowledge is the one that does the billing. Oh what a
                mark :-) Or was it a bill of a different currency instead. I like that
                one: since I know where to put the mark, I'll receive a bill of a different
                currency. My computer just quacked, reminds of a duck's bill :-)

                >>^!SetListDelimiter |_

                Yes I did notice the underscore. and wondered what was up with
                it. guessed it may have been an err, typo, etc.

                Since I noticed you had it (the clip) on .txt files I then became curious
                and tried

                ^!Shell "OtherApp.exe" "^%FileList^%Index%%"

                For the clip to open text or html or whatever kind of files to be opened in
                whatever app I want. What a neat way to open file types in whatever app I
                want!!

                Regards. Alan.
              • Jody
                Hi Alan, ... I set the delimiter with |_ and when you replace |with ^p, it left the underscore to automatically check the boxes for you in the wizard. Do see
                Message 7 of 9 , Dec 11, 2000
                • 0 Attachment
                  Hi Alan,

                  > >>^!SetListDelimiter |_
                  >
                  >Yes I did notice the underscore. and wondered what was up with
                  >it. guessed it may have been an err, typo, etc.
                  >
                  >Since I noticed you had it (the clip) on .txt files I then became curious
                  >and tried
                  >
                  >^!Shell "OtherApp.exe" "^%FileList^%Index%%"
                  >
                  >For the clip to open text or html or whatever kind of files to be opened in
                  >whatever app I want. What a neat way to open file types in whatever app I
                  >want!!

                  I set the delimiter with |_ and when you replace |with ^p, it left the underscore to automatically check the boxes for you in the wizard. Do see my DirStuff - there are a lot of things you can learn in it and a lot of very useful clips. You will do well to spend a day with it analyzing the Clips with what you already know - you should be able to understand it all. It has a setup to run that works in a lot of the Clips to remember your browse default and a half dozen or so pulldown paths. nite...

                  Happy Clip'n!
                  Jody

                  http://www.notetab.net

                  Subscribe, UnSubscribe, Options
                  mailto:Ntb-Clips-Subscribe@...
                  mailto:Ntb-Clips-UnSubscribe@...
                  http://www.egroups.com/group/ntb-clips
                • Alan
                  Hi Jody, ... OK I get it now (about underscore and checkboxes). Thanks. Yes, I had already downloaded your DirStuff and began looking at it. Will be spend
                  Message 8 of 9 , Dec 11, 2000
                  • 0 Attachment
                    Hi Jody,

                    >I set the delimiter with |_ and when you replace |with ^p,
                    >it left the underscore to automatically check the boxes for
                    >you in the wizard. Do see my DirStuff - there are a lot of
                    >things you can learn in it and a lot of very useful clips.
                    >You will do well to spend a day with it analyzing the Clips
                    >with what you already know - you should be able to
                    >understand it all. It has a setup to run that works in a
                    >lot of the Clips to remember your browse default and a half
                    >dozen or so pulldown paths. nite...

                    OK I get it now (about underscore and checkboxes). Thanks.

                    Yes, I had already downloaded your DirStuff and began looking at it. Will
                    be spend some more time studying the clips in it. Thanks again. Alan.
                  • Jody
                    Hi Alan, ... I m not sure if this was answered Alan, but look in my DirStuff. There are Clips already done using arrays to do exactly what you want.
                    Message 9 of 9 , Dec 14, 2000
                    • 0 Attachment
                      Hi Alan,

                      > >I am not sure that exactly what you are trying to do, so this may not be
                      >useful to you.
                      >
                      >Well, thanks, but ^!Open not do it.
                      >
                      >I was thinking more along the lines of array.
                      >
                      >Then, after having gathered the files into an array, to loop and
                      >use Shell command on #1 file taken from the array. then to loop
                      >again and use Shell command on #2 file taken from the array.
                      >And, repeat this loop until all files from the array have been
                      >treated in like manner.

                      I'm not sure if this was answered Alan, but look in my DirStuff.
                      There are Clips already done using arrays to do exactly what you
                      want. http://www.notetab.net/zip/dirstuff.zip

                      Happy Clip'n!
                      Jody

                      http://www.notetab.net

                      Subscribe, UnSubscribe, Options
                      mailto:Ntb-Clips-Subscribe@...
                      mailto:Ntb-Clips-UnSubscribe@...
                      http://www.egroups.com/group/ntb-clips
                    Your message has been successfully submitted and would be delivered to recipients shortly.