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

Re: [Clip] open all specifiled files in all subdirs

Expand Messages
  • Sheri
    Hi, Here is one that will open all files in one selected directory. It would do htm files by changing the *.* to *.htm. This clip could be adapted so it
    Message 1 of 16 , Aug 7, 2006
    • 0 Attachment
      Hi,

      Here is one that will open all files in one selected directory. It
      would do htm files by changing the *.* to *.htm. This clip could be
      adapted so it doesn't prompt, and then run with a ^!Clip command
      from another clip's loop which is processing an array of the
      subfolders of the main directory. This would be a little less
      straightforward than it sounds because NoteTab doesn't treat folders
      as files with a D attribute and there isn't a ^$GetFolders$
      function. It could be done, but you would probably need to do
      something like parse the output of a ^$GetDosOutput(Dir ^%
      maindir% /ad /b)$ into an array.

      I'm having trouble with my internet connection (first time it works
      in several days and not working well at all) so don't be surprised
      if I don't reply again soon :(

      Regards,
      Sheri

      H="Open All files in Selected Directory"
      ;2002 by Sheri Pierce
      ^!Set %Dirname%=^?{(T=D)Full dir path, end in backslash==^%Dirname%}
      ^!SetListDelimiter ^p
      ^!SetArray %files%=^$GetFiles("^%Dirname%";*.*;;NAME)$
      ^!Set %Count%=^%files0%
      ^!Set %Index%=0
      :Loop
      ^!Inc %Index%
      ^!If ^%Index% > ^%Count% Exit
      ^!Open ^%files^%Index%%
      ^!Jump Doc_Start
      ^!Goto Loop
      :Exit
      ;end of clip
    • Mark B.
      ... Hi, Sheri. This one with the + appears to handle subfolders directly, and both .htm and .html files. ^!SetArray %files%=^$GetFiles( +C: Documents and
      Message 2 of 16 , Aug 7, 2006
      • 0 Attachment
        --- In ntb-clips@yahoogroups.com, "Sheri" <silvermoonwoman@...> wrote:
        > Here is one that will open all files in one selected directory. It
        > would do htm files by changing the *.* to *.htm. This clip could be
        > adapted so it doesn't prompt, and then run with a ^!Clip command
        > from another clip's loop which is processing an array of the
        > subfolders of the main directory. This would be a little less
        > straightforward than it sounds because NoteTab doesn't treat folders
        > as files with a D attribute and there isn't a ^$GetFolders$
        > function. It could be done, but you would probably need to do
        > something like parse the output of a ^$GetDosOutput(Dir ^%
        > maindir% /ad /b)$ into an array.
        >
        > I'm having trouble with my internet connection (first time it works
        > in several days and not working well at all) so don't be surprised
        > if I don't reply again soon :(
        >
        > Regards,
        > Sheri
        >
        > H="Open All files in Selected Directory"
        > ;2002 by Sheri Pierce
        > ^!Set %Dirname%=^?{(T=D)Full dir path, end in backslash==^%Dirname%}
        > ^!SetListDelimiter ^p
        > ^!SetArray %files%=^$GetFiles("^%Dirname%";*.*;;NAME)$
        > ^!Set %Count%=^%files0%
        > ^!Set %Index%=0
        > :Loop
        > ^!Inc %Index%
        > ^!If ^%Index% > ^%Count% Exit
        > ^!Open ^%files^%Index%%
        > ^!Jump Doc_Start
        > ^!Goto Loop
        > :Exit
        > ;end of clip
        >

        Hi, Sheri.
        This one with the "+" appears to handle subfolders directly, and both
        .htm and .html files.

        ^!SetArray %files%=^$GetFiles("+C:\Documents and Settings\Me\My
        Documents\Folder";*.htm*)$
        ^!Set %i%=0
        :Loop
        ^!Inc %i%
        ^!If ^%i% > ^%files0% ExitLoop
        ^!Open ^%files^%i%%
        ^!Goto Loop
        :ExitLoop
      • loro
        ... You can use the ^$GetFiles()$ function with the + option. I made one recently. You are welcome to it if it does what you want. It was made for opening very
        Message 3 of 16 , Aug 7, 2006
        • 0 Attachment
          Mike Breiding wrote:
          >hsavage wrote:
          > >You would need to build an array or find each file, one after another,
          > >using ^$GetFiles or ^$GetFileNext$, of html filenames within the path
          > >and open them sequentially.
          >
          >Thanks for the suggestion but this is beyond my comprehension. I was hoping
          >to find something already in use.

          You can use the ^$GetFiles()$ function with the + option.

          I made one recently. You are welcome to it if it does what you want. It was
          made for opening very many files at once, hence the Close clip. It will
          close the files the Open clip opened without touching other open document.
          You can delete the ^!StatusShow lines if you don't need them.
          OpenCloseMulti is for the clipbar, lets you choose between the two other
          clips. So it's 3 clips in all.


          ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
          H="OpenMulti"

          ^!SetWizardlabel Choose start directory and file type(s)
          ^!Set %dir%=^?{(T=D)Choose directory=C:\Dir\you\want\to}start\in\};
          %type%=^?{(T=C)Chose file type(s)=_*.txt|*.csv|*.htm;*.html}

          ^!SetArray %p_files%=^$GetFiles("+^%dir%";^%type%;Name)$
          ^!If ^%p_files%=^%empty% nope

          ^!SetScreenUpdate OFF
          ^!StatusShow Opening files...
          ^!Set %cntr%=0
          :loop
          ^!Inc %cntr%
          ^!Open ^%p_files^%cntr%%
          ^!If ^%cntr%=^%p_files0% end else loop

          :nope
          ^!Info No .^%type% files found.

          ; loro 2006.07.09


          H="CloseMulti"

          ^!IfTrue ^$IsOpen("^%p_files1")$ next else nope

          ^!StatusShow Closing files...
          ^!Set %cntr%=0
          :loop
          ^!Inc %cntr%
          ^!Close "^%p_files^%cntr%%"
          ^!If ^%cntr%=^%p_files0% end else loop

          :nope
          ^!Info Specified files not open.


          H="OpenCloseMulti"

          ^!FarClip ^$GetLibraryName$:^?{(T=L)==OpenMulti|CloseMulti}
          ___________________________________


          Lotta
        • Sheri
          ... How about that?! Never saw it (the + option) and it was there all the time. Thanks for pointing it out. Regards, Sheri
          Message 4 of 16 , Aug 7, 2006
          • 0 Attachment
            --- In ntb-clips@yahoogroups.com, "Mark B." <breaumark@...> wrote:

            > Hi, Sheri.
            > This one with the "+" appears to handle subfolders directly, and both
            > .htm and .html files.
            >
            > ^!SetArray %files%=^$GetFiles("+C:\Documents and Settings\Me\My
            > Documents\Folder";*.htm*)$
            > ^!Set %i%=0
            > :Loop
            > ^!Inc %i%
            > ^!If ^%i% > ^%files0% ExitLoop
            > ^!Open ^%files^%i%%
            > ^!Goto Loop
            > :ExitLoop
            >

            How about that?! Never saw it (the + option) and it was there all the
            time. Thanks for pointing it out.

            Regards,
            Sheri
          • hsavage
            ... directories ... directory. ... Mike, Here are 2 clips you may want to try. The first will open most variations of html file in the folder, and/or,
            Message 5 of 16 , Aug 8, 2006
            • 0 Attachment
              Mike Breiding wrote:
              > Greetings Clipsters,
              >
              > Is there a clip which will open all specified files in all sub
              directories
              > in a given path?
              >
              > Such as: open all html files in all the sub directories of a parent
              directory.
              >
              >
              > Thanks,
              > -Mike

              Mike,

              Here are 2 clips you may want to try.

              The first will open most variations of html file in the folder, and/or,
              subfolders you choose. One of my test folders opened 241 html files.

              The second will open only the files you choose in the folder, and/or,
              subfolders you choose.

              The clip wizard title should number the total of files that will open or
              are selected to be opened.

              Ensure that the longer lines in the clips don't get wrapped in email.
              All valid lines will start with an H=, a semi-colon or a circumflex.


              H="Mass Opening"
              ;_ Modified-Updated~Created_20060808
              ;_ hrs ø hsavage·pobox·com_02:53:45p
              ;
              ; - after making selections clip will open all *html files
              ; - in the selected folders immediately
              ^!Set %selected%=^?[Show Files Pre-Selected==YES^=_|_NO^=^%empty%]
              ^!Set %subfolder%=^?[Open Files in SubFolders==YES^=+|_NO^=^%empty%]
              ^!SetListDelimiter |
              ; - edit the next line and use your own default folder
              ^!Set %file_path%=^?{(T=D)Choose Folder Containing Subject
              Files=C:\+r2rweb\}
              ^!Set %files%=^$GetFiles("^%subfolder%^%file_path%";"*.*htm?";unsorted)$
              ^!If ^%files%=^%EMPTY% END
              ^!Set %files%=^$StrReplace("^%file_path%";^%sel%;^%files%;0;0)$
              ^!SetArray %files%=^%files%
              ^!Continue - ^%files0 - FILES TO OPEN
              ^!Set %idx%=0; %count%=^%files0%
              ;
              :LOOP
              ^!Inc %idx%
              ^!Open ^%file_path%^%files^%idx%%
              ^!If ^%idx% = ^%count% EXIT ELSE LOOP


              H="Selective Opening"
              ;_ Modified-Updated~Created_20060808
              ;_ hrs ø hsavage·pobox·com_02:53:15p
              ;
              ; - after making selections clip lets you select *html files
              ;- to open in the selected folders immediately
              ^!Set %selected%=^?[Show Files Pre-Selected==YES^=_|_NO^=^%empty%]
              ^!Set %subfolder%=^?[Show SubFolders in Path==YES^=+|_NO^=^%empty%]
              ^!SetListDelimiter |^%selected%
              ; - edit the next line and use your own default folder
              ^!Set %file_path%=^?{(T=D)Choose Folder Containing Subject
              Files=C:\+r2rweb\}
              ^!Set %files%=^$GetFiles("^%subfolder%^%file_path%";"*.*htm?";unsorted)$
              ^!If ^%files%=^%EMPTY% END
              ^!Set %files%=^$StrReplace("^%file_path%";^%selected%;^%files%;0;0)$
              ^!Set %filecount%=^$Calc(^$StrCount("|";"^%files";0;0)$+1)$
              ^!SetWizardLabel -^%filecount%- Files in Selected Path
              ^!SetArray %files%=^?{(H=26;T=A)TEXT FILES TO LOAD!==^%subfolder%^%files%}
              ^!Set %idx%=0; %count%=^%files0%
              ;
              :LOOP
              ^!Inc %idx%
              ^!Open ^%file_path%^%files^%idx%%
              ^!If ^%idx% = ^%count% EXIT ELSE LOOP


              ºvº
              2006.08.08
              "Cooking III; How Not to Inflict Your Diets on Other People."
              hrs ø hsavage@...
            • Mike Breiding
              Reply at bottom. -mb ... Greetings, Thanks for sending these. However, when I run the clip I get a second dialog box which says Complete the clip What am I
              Message 6 of 16 , Aug 9, 2006
              • 0 Attachment
                Reply at bottom. -mb
                At 09:10 PM 8/8/2006 , you wrote:

                >Mike Breiding wrote:
                > > Greetings Clipsters,
                > >
                > > Is there a clip which will open all specified files in all sub
                >directories
                > > in a given path?
                > >
                > > Such as: open all html files in all the sub directories of a parent
                >directory.
                > >
                > >
                > > Thanks,
                > > -Mike
                >
                >Mike,
                >
                >Here are 2 clips you may want to try.
                >
                >The first will open most variations of html file in the folder, and/or,
                >subfolders you choose. One of my test folders opened 241 html files.
                >
                >The second will open only the files you choose in the folder, and/or,
                >subfolders you choose.
                >
                >The clip wizard title should number the total of files that will open or
                >are selected to be opened.
                >
                >Ensure that the longer lines in the clips don't get wrapped in email.
                >All valid lines will start with an H=, a semi-colon or a circumflex.
                >
                >H="Mass Opening"
                >;_ Modified-Updated~Created_20060808
                >;_ hrs ø hsavage·pobox·com_02:53:45p
                >;
                >; - after making selections clip will open all *html files
                >; - in the selected folders immediately
                >^!Set %selected%=^?[Show Files Pre-Selected==YES^=_|_NO^=^%empty%]
                >^!Set %subfolder%=^?[Open Files in SubFolders==YES^=+|_NO^=^%empty%]
                >^!SetListDelimiter |
                >; - edit the next line and use your own default folder
                >^!Set %file_path%=^?{(T=D)Choose Folder Containing Subject
                >Files=C:\+r2rweb\}
                >^!Set %files%=^$GetFiles("^%subfolder%^%file_path%";"*.*htm?";unsorted)$
                >^!If ^%files%=^%EMPTY% END
                >^!Set %files%=^$StrReplace("^%file_path%";^%sel%;^%files%;0;0)$
                >^!SetArray %files%=^%files%
                >^!Continue - ^%files0 - FILES TO OPEN
                >^!Set %idx%=0; %count%=^%files0%
                >;
                >:LOOP
                >^!Inc %idx%
                >^!Open ^%file_path%^%files^%idx%%
                >^!If ^%idx% = ^%count% EXIT ELSE LOOP
                >
                >H="Selective Opening"
                >;_ Modified-Updated~Created_20060808
                >;_ hrs ø hsavage·pobox·com_02:53:15p
                >;
                >; - after making selections clip lets you select *html files
                >;- to open in the selected folders immediately
                >^!Set %selected%=^?[Show Files Pre-Selected==YES^=_|_NO^=^%empty%]
                >^!Set %subfolder%=^?[Show SubFolders in Path==YES^=+|_NO^=^%empty%]
                >^!SetListDelimiter |^%selected%
                >; - edit the next line and use your own default folder
                >^!Set %file_path%=^?{(T=D)Choose Folder Containing Subject
                >Files=C:\+r2rweb\}
                >^!Set %files%=^$GetFiles("^%subfolder%^%file_path%";"*.*htm?";unsorted)$
                >^!If ^%files%=^%EMPTY% END
                >^!Set %files%=^$StrReplace("^%file_path%";^%selected%;^%files%;0;0)$
                >^!Set %filecount%=^$Calc(^$StrCount("|";"^%files";0;0)$+1)$
                >^!SetWizardLabel -^%filecount%- Files in Selected Path
                >^!SetArray %files%=^?{(H=26;T=A)TEXT FILES TO LOAD!==^%subfolder%^%files%}
                >^!Set %idx%=0; %count%=^%files0%
                >;
                >:LOOP
                >^!Inc %idx%
                >^!Open ^%file_path%^%files^%idx%%
                >^!If ^%idx% = ^%count% EXIT ELSE LOOP

                Greetings,
                Thanks for sending these.
                However, when I run the clip I get a second dialog box which says"Complete
                the clip"
                What am I supposed to enter here?

                I had expected something like dialogs to select the file types then a
                browse dialog to the folder(s) where the files are located.
                I am obviously missing something!
                -Mike









                ----------
                Check it out:
                www.EpicRoadTrips.us

                [Non-text portions of this message have been removed]
              • Mike Breiding
                ... Hi Lotta, I could not get this to work for me. I kept getting a files not found message. This will work for subdirs? Thanks, -Mike [Non-text portions of
                Message 7 of 16 , Aug 9, 2006
                • 0 Attachment
                  At 01:06 PM 8/7/2006 , you wrote:
                  >Mike Breiding wrote:
                  > >hsavage wrote:
                  > > >You would need to build an array or find each file, one after another,
                  > > >using ^$GetFiles or ^$GetFileNext$, of html filenames within the path
                  > > >and open them sequentially.
                  > >
                  > >Thanks for the suggestion but this is beyond my comprehension. I was hoping
                  > >to find something already in use.
                  >
                  >You can use the ^$GetFiles()$ function with the + option.
                  >
                  >I made one recently. You are welcome to it if it does what you want. It was
                  >made for opening very many files at once, hence the Close clip. It will
                  >close the files the Open clip opened without touching other open document.
                  >You can delete the ^!StatusShow lines if you don't need them.
                  >OpenCloseMulti is for the clipbar, lets you choose between the two other
                  >clips. So it's 3 clips in all.
                  >
                  >¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
                  >H="OpenMulti"
                  >
                  >^!SetWizardlabel Choose start directory and file type(s)
                  >^!Set %dir%=^?{(T=D)Choose directory=C:\Dir\you\want\to}start\in\};
                  >%type%=^?{(T=C)Chose file type(s)=_*.txt|*.csv|*.htm;*.html}
                  >
                  >^!SetArray %p_files%=^$GetFiles("+^%dir%";^%type%;Name)$
                  >^!If ^%p_files%=^%empty% nope
                  >
                  >^!SetScreenUpdate OFF
                  >^!StatusShow Opening files...
                  >^!Set %cntr%=0
                  >:loop
                  >^!Inc %cntr%
                  >^!Open ^%p_files^%cntr%%
                  >^!If ^%cntr%=^%p_files0% end else loop
                  >
                  >:nope
                  >^!Info No .^%type% files found.
                  >
                  >; loro 2006.07.09
                  >
                  >H="CloseMulti"
                  >
                  >^!IfTrue ^$IsOpen("^%p_files1")$ next else nope
                  >
                  >^!StatusShow Closing files...
                  >^!Set %cntr%=0
                  >:loop
                  >^!Inc %cntr%
                  >^!Close "^%p_files^%cntr%%"
                  >^!If ^%cntr%=^%p_files0% end else loop
                  >
                  >:nope
                  >^!Info Specified files not open.
                  >
                  >H="OpenCloseMulti"
                  >
                  >^!FarClip ^$GetLibraryName$:^?{(T=L)==OpenMulti|CloseMulti}
                  >___________________________________

                  Hi Lotta,
                  I could not get this to work for me.
                  I kept getting a "files not found" message.
                  This will work for subdirs?

                  Thanks,
                  -Mike


                  [Non-text portions of this message have been removed]
                • Don - HtmlFixIt.com
                  Hi Mike, In addition to deleting unnecessary content from posts via a cut, you might try unwrapping any wrapped lines such as this one shown below that is all
                  Message 8 of 16 , Aug 9, 2006
                  • 0 Attachment
                    Hi Mike,

                    In addition to deleting unnecessary content from posts via a cut, you
                    might try unwrapping any wrapped lines such as this one shown below that
                    is all one line. All lines should be blank or start with either a ^ or
                    a : I believe. Obviously you also need to change the "Dir\you\want etc"
                    to the proper directory on your computer. There is also an erroneous }
                    in that dir path that should not be there.

                    Don


                    >> ^!Set %dir%=^?{(T=D)Choose directory=C:\Dir\you\want\to}start\in\};
                    >> %type%=^?{(T=C)Chose file type(s)=_*.txt|*.csv|*.htm;*.html}
                  • Mike Breiding
                    ... Hi Don, Will make more of an effort to trim my posts. Never quite sure how much to include. Will look over the clips again for proper formatting. Thanks,
                    Message 9 of 16 , Aug 9, 2006
                    • 0 Attachment
                      At 08:24 AM 8/9/2006 , you wrote:
                      >Hi Mike,
                      >
                      >In addition to deleting unnecessary content from posts via a cut, you
                      >might try unwrapping any wrapped lines such as this one shown below that
                      >is all one line. All lines should be blank or start with either a ^ or
                      >a : I believe. Obviously you also need to change the "Dir\you\want etc"
                      >to the proper directory on your computer. There is also an erroneous }
                      >in that dir path that should not be there.
                      >
                      >Don
                      >
                      > >> ^!Set %dir%=^?{(T=D)Choose directory=C:\Dir\you\want\to}start\in\};
                      > >> %type%=^?{(T=C)Chose file type(s)=_*.txt|*.csv|*.htm;*.html}


                      Hi Don,
                      Will make more of an effort to trim my posts. Never quite sure how much to
                      include.

                      Will look over the clips again for proper formatting.

                      Thanks,
                      -Mike

                      [Non-text portions of this message have been removed]
                    • hsavage
                      ... Mike, There was an extraneous line in clip 1 but it had no effect on clip function. With the corrected clips below the most important thing is to; ENSURE
                      Message 10 of 16 , Aug 9, 2006
                      • 0 Attachment
                        Mike Breiding wrote:
                        > Reply at bottom. -mb
                        > At 09:10 PM 8/8/2006 , you wrote:
                        >
                        >> Mike Breiding wrote:
                        >>> Greetings Clipsters,
                        >>>
                        >>> Is there a clip which will open all specified files in all sub
                        >> directories
                        >>> in a given path?
                        >>>
                        >>> Such as: open all html files in all the sub directories of a parent
                        >> directory.
                        >>>
                        >>> Thanks,
                        >>> -Mike

                        >> Here are 2 clips you may want to try.
                        >>
                        >> The first will open most variations of html file in the folder, and/or,
                        >> subfolders you choose. One of my test folders opened 241 html files.
                        >>
                        >> The second will open only the files you choose in the folder, and/or,
                        >> subfolders you choose.
                        >>
                        >> The clip wizard title should number the total of files that will open or
                        >> are selected to be opened.
                        >>
                        >> Ensure that the longer lines in the clips don't get wrapped in email.
                        >> All valid lines will start with an H=, a semi-colon or a circumflex.

                        Mike,

                        There was an extraneous line in clip 1 but it had no effect on clip
                        function. With the corrected clips below the most important thing is to;

                        ENSURE THAT THE LONGER LINES IN THE CLIPS DON'T GET WRAPPED IN EMAIL,
                        and remember, all valid lines will start with an H=, A COLON, A
                        SEMI-COLON OR A CIRCUMFLEX.

                        I could post these on the yahoo files page if you want to try
                        downloading them that way.

                        I've separated the lines that may possibly get wrapped by a blank line
                        with a leading semi-colon above and below the lines that may cause trouble.


                        H="Mass Opening"
                        ;_ Modified-Updated~Created_20060809
                        ;_ hrs ø hsavage·pobox·com_08:54:05a
                        ;
                        ; - after making selections clip will open all *html files
                        ; - in the selected folders immediately
                        ;
                        ^!Set %subfolder%=^?[Open Files in SubFolders==YES^=+|_NO^=^%empty%]
                        ;
                        ^!SetListDelimiter |
                        ; - edit the next line and use your own default folder
                        ;
                        ^!Set %file_path%=^?{(T=D)Choose Folder Containing Subject
                        Files=C:\+r2rweb\}
                        ;
                        ^!Set %files%=^$GetFiles("^%subfolder%^%file_path%";"*.*htm?";unsorted)$
                        ;
                        ^!If ^%files%=^%EMPTY% END
                        ^!SetArray %files%=^%files%
                        ^!Continue - ^%files0 - FILES TO OPEN, CONTINUE IF FEELING LUCKY!
                        ^!Set %idx%=0; %count%=^%files0%
                        :LOOP
                        ^!Inc %idx%
                        ^!Open ^%files^%idx%%
                        ^!If ^%idx% = ^%count% EXIT ELSE LOOP
                        ;---end


                        H="Selective Opening"
                        ;_ Modified-Updated~Created_20060809
                        ;_ hrs ø hsavage·pobox·com_08:54:13a
                        ;
                        ; - after making selections clip lets you select *html files
                        ; - to open in the selected folders immediately
                        ^!Set %selected%=^?[Show Files Pre-Selected==YES^=_|_NO^=^%empty%]
                        ^!Set %subfolder%=^?[Show SubFolders in Path==YES^=+|_NO^=^%empty%]
                        ^!SetListDelimiter |^%selected%
                        ; - edit the next line and use your own default folder
                        ;
                        ^!Set %file_path%=^?{(T=D)Choose Folder Containing Subject
                        Files=C:\+r2rweb\}
                        ;
                        ^!Set %files%=^$GetFiles("^%subfolder%^%file_path%";"*.*htm?";unsorted)$
                        ;
                        ^!If ^%files%=^%EMPTY% END
                        ^!Set %files%=^$StrReplace("^%file_path%";^%selected%;^%files%;0;0)$
                        ^!Set %filecount%=^$Calc(^$StrCount("|";"^%files";0;0)$+1)$
                        ^!SetWizardLabel -^%filecount%- Files in Selected Path
                        ;
                        ^!SetArray %files%=^?{(H=26;T=A)TEXT FILES TO LOAD!==^%subfolder%^%files%}
                        ;
                        ^!Set %idx%=0; %count%=^%files0%
                        :LOOP
                        ^!Inc %idx%
                        ^!Open ^%file_path%^%files^%idx%%
                        ^!If ^%idx% = ^%count% EXIT ELSE LOOP
                        ;---end


                        ºvº
                        2006.08.09
                        -Newspaper HeadLine...
                        "Deer Kill 17,000"
                        hrs ø hsavage@...
                      • loro
                        ... Yes. For once I m sure it works because someone other than me has used it. :-P But of course, I made an error while changing the path to a directory on my
                        Message 11 of 16 , Aug 9, 2006
                        • 0 Attachment
                          Mike Breiding wrote:
                          >I could not get this to work for me.
                          >I kept getting a "files not found" message.
                          >This will work for subdirs?

                          Yes. For once I'm sure it works because someone other than me has used it. :-P

                          But of course, I made an error while changing the path to a directory on my
                          machine to a dummy path. I also forgot to tell you to edit that dummy path
                          or delete it altogether. It's there because originally this clip was made
                          to open files in a certain directory.

                          ^!Set %dir%=^?{(T=D)Choose directory=C:\Dir\you\want\to}start\in\};

                          See? I typed a "}" instead of a "\". :-(

                          I'll send it to you to make up for it.

                          Lotta
                        • hsavage
                          ... hoping ... Mike. Following are 2 clips that should meet your needs. These are loosely based on the OpenMulti clips by Lotta. You can open an edit
                          Message 12 of 16 , Aug 20, 2006
                          • 0 Attachment
                            loro wrote:
                            > Mike Breiding wrote:
                            >
                            >> Thanks for the suggestion but this is beyond my comprehension. I was
                            hoping
                            >> to find something already in use.
                            >
                            > You can use the ^$GetFiles()$ function with the + option.
                            >
                            > I made one recently. You are welcome to it if it does what you want
                            > OpenCloseMulti is for the clipbar, lets you choose between the two other
                            > clips. So it's 3 clips in all.
                            >
                            >
                            > H="OpenMulti"
                            > ; loro 2006.07.09
                            >
                            > H="CloseMulti"
                            >
                            > H="OpenCloseMulti"
                            >
                            > Lotta

                            Mike.

                            Following are 2 clips that should meet your needs. These are loosely
                            based on the "OpenMulti" clips by Lotta. You can open an edit session
                            by running "Open Multi_Edits", select whether to search a single folder
                            or the folder and its subfolders today, shut down your computer, restart
                            the next day and resume the editing.

                            After editing run "Close Multi_Edits" to close the files opened in the
                            edit session. The clips don't rely on a variable to store the names of
                            files opened, the list of filenames to edit is stored in a
                            favorites(.fvr) file that is created when you start the editing session.

                            The only line you may have line-wrapping trouble with is the "^!Set
                            %dir%=" in the first clip. I left a blank line below it to indicate the
                            line end.

                            ------------------------
                            H="Open Multi_Edits"
                            ; initiated by loro
                            ;_ Modified-Updated~Created_20060820
                            ;_ hrs ø hsavage·pobox·com_05:16:40p
                            ^!ClearVariables
                            ^!SetWizardlabel Choose start directory and file type(s)
                            ; - edit 'C:\Dir\You\Want\To Start\In\' and use your own default dir
                            ^!Set %dir%=^?{(T=D)Choose Directory=C:\Dir\You\Want\To Start\In\};
                            %subdirs%=^?{Open Files In SubFolders==Yes^=+|_NO^=^%empty%};
                            %type%=^?{(T=L;H=5)Choose File Type(S)==_*.*htm?|*.csv|*.otl|*.tpl|*.txt}
                            ;
                            ^!SetListDelimiter ^p
                            ^!SetArray %files%=^$GetFiles("^%subdirs%^%dir%";^%type%;Name)$
                            ^!If ^%files%=^%empty% NOPE
                            ^!TextToFile "^$GetFavoritePath$Multi_Edits.fvr" ^%files%
                            ^!OpenFavorites Multi_Edits
                            ^!Goto END
                            :NOPE
                            ^!Info No .^%type% files found.


                            H="Close Multi_Edits"
                            ; initiated by loro
                            ;_ Modified-Updated~Created_20060820
                            ;_ hrs ø hsavage·pobox·com_05:16:15p
                            ^!IfFileExist "^$GetFavoritePath$Multi_Edits.fvr" NEXT ELSE NOPE
                            ^!SetListDelimiter ^p
                            ^!SetArray %files%=^$GetFileText(^$GetFavoritePath$Multi_Edits.fvr)$
                            ^!Set %count%=0
                            :loop
                            ^!Inc %count%
                            ^!Close "^%files^%count%%" SAVE
                            ^!If ^%count% = ^%files0% NEXT ELSE LOOP
                            ^!DeleteFile "^$GetFavoritePath$Multi_Edits.fvr"
                            ^!Goto END
                            :NOPE
                            ^!Info Favorites File Doesn't Exist
                            ---------------------------

                            ºvº
                            2006.08.20
                            "If your dog is fat, you aren't getting enough exercise."
                            hrs ø hsavage@...
                          • hsavage
                            ... Mike, This is a revised clip loading multiple files for edit. I ve streamlined it so one clip does it all, loads filetypes you choose from folders you
                            Message 13 of 16 , Aug 21, 2006
                            • 0 Attachment
                              hsavage wrote:
                              > loro wrote:
                              >> Mike Breiding wrote:
                              >>
                              >>> Thanks for the suggestion but this is beyond my comprehension. I was
                              > hoping
                              >>> to find something already in use.
                              >>
                              >> You can use the ^$GetFiles()$ function with the + option.
                              >>
                              >> I made one recently. You are welcome to it if it does what you want
                              >> OpenCloseMulti is for the clipbar, lets you choose between the two other
                              >> clips. So it's 3 clips in all.
                              >>
                              >>
                              >> H="OpenMulti"
                              >> ; loro 2006.07.09
                              >>
                              >> H="CloseMulti"
                              >>
                              >> H="OpenCloseMulti"
                              >>
                              >> Lotta

                              Mike,

                              This is a revised clip loading multiple files for edit. I've
                              streamlined it so one clip does it all, loads filetypes you choose from
                              folders you choose to allow editing of the files. When finished editing
                              re-run the clip, it determines whether it should start a new editing
                              session or close the edited files you have loaded.

                              Again, watch the '^!Set %dir%=' line to insure it doesn't get wrapped in
                              email.

                              --------------------------
                              H="Open-Close Multi_Edits"
                              ; initiated by loro 2006.07.09
                              ;_ Modified-Updated~Created_20060821
                              ;_ hrs ø hsavage·pobox·com_01:48:13a
                              ^!ClearVariables
                              ^!SetScreenUpdate 0
                              ^!SetListDelimiter ^p
                              ^!IfFileExist "^$GetFavoritePath$Multi_Edits.fvr" CLOSE_FILES
                              ;
                              :OPEN
                              ^!SetWizardTitle "**__STARTING NEW EDIT SESSION!__**"
                              ^!SetWizardlabel Set Start Folder?, Subdir Scan?, File Type(S)?
                              ; - edit 'C:\Dir\You\Want\To Start\In\' to use your own default dir
                              ;
                              ^!Set %dir%=^?{(T=D)CHOOSE START FOLDER=C:\Dir\You\Want\To Start\In\};
                              %subdirs%=^?{Scan Files In SubFolders?==YES^=+|_NO^=^%empty%};
                              %types%=^?{(T=A;H=5)Choose FileType(S) To Load!==_*.*HTM?|*.CSS|*.CSV|*.TXT}
                              ;
                              ^!Set %types%=^$StrReplace("^p";";";"^%types%";0;0)$
                              ^!Set %files%=^$GetFiles("^%subdirs%^%dir%";"^%types%";Name)$
                              ^!If ^%files%=^%empty% NO_FILE_TYPES
                              ^!TextToFile "^$GetFavoritePath$Multi_Edits.fvr" ^%files%
                              ^!OpenFavorites Multi_Edits
                              ^!Goto END
                              ;
                              :NO_FILE_TYPES
                              ^!Info No .^%types% files found.
                              ^!Goto END
                              ;
                              :CLOSE_FILES
                              ^!SetArray %files%=^$GetFileText(^$GetFavoritePath$Multi_Edits.fvr)$
                              ^!StatusShow Closing Edit Session Files!
                              ^!Delay 9
                              ;
                              ^!Set %count%=0
                              :LOOP
                              ^!Inc %count%
                              ^!Close "^%files^%count%%" SAVE
                              ^!If ^%count% = ^%files0% NEXT ELSE LOOP
                              ^!DeleteFile "^$GetFavoritePath$Multi_Edits.fvr"
                              -----------------------------

                              ºvº
                              2006.08.21
                              -Newspaper HeadLine...
                              "Iraqi Head Seeks Arms"
                              hrs ø hsavage@...
                            Your message has been successfully submitted and would be delivered to recipients shortly.