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

Re: [Clip] Getting a list of directories

Expand Messages
  • hsavage
    ... Hey Jody, Here s something that may give you a speedy alternative to ^$GetPath[+](FileName)$ ^$GetDir[+]( base path )$ I was tinkering and discovered the
    Message 1 of 25 , Aug 29, 2006
      Jody wrote:
      > Hi John,
      >
      > The Clip I modified (File Path/List...) used the ^$GetFiles
      > function and stripped the filenames off, then sorted removing
      > duplicates. It's a long way around to do it and is quite slow in
      > doing like "C:\" for instance. I did notice that I already had
      > DOS commands setup to do it which is quite fast. I'm still going
      > to turn in your request though.
      >
      > Happy Clip'n!
      > Jody

      Hey Jody,

      Here's something that may give you a speedy alternative to

      ^$GetPath[+](FileName)$
      ^$GetDir[+]("base path")$

      I was tinkering and discovered the short clip below works really well,
      and fast, and can be adapted to different uses, you're welcome to it for
      your Dirstuff or any other use. I kept all the lines short and simple
      for easy reading.

      h=listdirs
      ^!Set %dir%=^?{(T=D)Choose Folder To See FolderTree=C:\}
      ^!Set %sub_dirs%=^$GetFiles("+^%dir";nul)$
      ^!Set %sub_dirs%=^$StrReplace("" "";"^p";"^%sub_dirs%";0;0)$
      ^!Set %sub_dirs%=^$StrReplace("nul";"";"^%sub_dirs%";0;0)$
      ^!Set %sub_dirs%=^$StrSort("^%sub_dirs%";0;1;1)$
      ^!Info [L]^%nL%^%sub_dirs%

      ºvº
      2006.08.29
      -Newspaper HeadLine...
      "New Vaccine May Contain Rabies"
      hrs ø hsavage@...
    • John Mitchell
      Hello hrs Your example relies on the presence of nul in the $GetFiles command to operate correctly. Where is nul documented? I didn t find anything in
      Message 2 of 25 , Aug 29, 2006
        Hello hrs

        Your example relies on the presence of "nul" in the $GetFiles command to
        operate correctly. Where is "nul" documented? I didn't find anything in
        either the Notetab Help or the Clipbook Help.

        Regards, John M

        P.S. Your 2nd line of code should read....

        ^!Set %sub_dirs%=^$GetFiles("+^%dir%";nul)$

        (you left off the % after ^%dir in the original)

        ----- Original message -----
        From: "hsavage" <hsavage@...>
        To: ntb-clips@yahoogroups.com
        Date: Tue, 29 Aug 2006 19:59:18 -0500
        Subject: Re: [Clip] Getting a list of directories

        <--- snip ---->

        I was tinkering and discovered the short clip below works really well,
        and fast, and can be adapted to different uses...

        h=listdirs
        ^!Set %dir%=^?{(T=D)Choose Folder To See FolderTree=C:\}
        ^!Set %sub_dirs%=^$GetFiles("+^%dir";nul)$
        ^!Set %sub_dirs%=^$StrReplace("" "";"^p";"^%sub_dirs%";0;0)$
        ^!Set %sub_dirs%=^$StrReplace("nul";"";"^%sub_dirs%";0;0)$
        ^!Set %sub_dirs%=^$StrSort("^%sub_dirs%";0;1;1)$
        ^!Info [L]^%nL%^%sub_dirs%

        ºvº
        2006.08.29
        -Newspaper HeadLine...
        "New Vaccine May Contain Rabies"
        hrs ø hsavage@...
      • hsavage
        ... John, I seriously doubt that you find nul documented anywhere unless you have an old version of DOS(Disk Operating System). I learned about it back
        Message 3 of 25 , Aug 29, 2006
          John Mitchell wrote:
          > Hello hrs
          >
          > Your example relies on the presence of "nul" in the $GetFiles command to
          > operate correctly. Where is "nul" documented? I didn't find anything in
          > either the Notetab Help or the Clipbook Help.
          >
          > Regards, John M
          >
          > P.S. Your 2nd line of code should read....
          >
          > ^!Set %sub_dirs%=^$GetFiles("+^%dir%";nul)$
          >
          > (you left off the % after ^%dir in the original)

          John,

          I seriously doubt that you find 'nul' documented anywhere unless you
          have an old version of DOS(Disk Operating System). I learned about it
          back around DOS 2 or DOS 3. I haven't seen it documented since then but
          it still is valid.

          You say the clip relies on the presence of 'nul', technically that's
          true, but null equals 0 or nothing so I guess you could it relies on the
          presence of 'nul'.

          You're right about the dropped percent(%) also and I really try hard to
          avoid things like that but, apparently it wasn't critical in this case.

          All that aside have you tried the clip? I ran it on small and large
          folders with lots of subfolders and it ran rather quickly.

          ºvº
          2006.08.30
          "One of us is thinking about sex..., OK, it's me."
          hrs ø hsavage@...
        • John Mitchell
          hrs Yes, I tried it and yes it works. Thanks, it s a solution. I certainly remember the DOS construct some DOS command nul which could be used to redirect
          Message 4 of 25 , Aug 29, 2006
            hrs

            Yes, I tried it and yes it works. Thanks, it's a solution. I certainly
            remember the DOS construct some DOS command > nul which could be used to
            redirect console output to a black hole. In the context of your clip,
            however, nul is being used in a ^$GetFiles field whose description reads
            "Filespecs" and which would normally be something like "*.xls" or
            similar. I played around with it quite a bit. Here are my observations:

            If you omit the parameter, as in ^$GetFiles("+^%dir%";)$ you get an
            address violation (in NTB Pro 5), which I would consider to be a bug.

            If you make the parameter empty, as in ^$GetFiles("+^%dir%";"")$ then
            nothing is returned.

            If you make the parameter a valid filespec for a type you know does not
            exist in the selected directory, as in ^$GetFiles("+^%dir%";"*.xxx")$
            then nothing is returned.

            If you make the parameter a valid filespec for a type you know exists in
            the selected directory, as in ^$GetFiles("+^%dir%";"*.jpg")$ then a list
            of matching files is returned, as you would expect. It's worth noting
            that the list is exclusively files, even if your structure includes a
            directory called (e.g) mystuff.jpg.

            That leaves us with the use of nul in the parameter position, as in
            ^!Set %sub_dirs%=^$GetFiles("+^%dir%";nul)$ which returns just
            directories. The fact that it works provides me with a mechanism for
            doing what I want but it also raises the question of *why* it works and
            the even more pressing question of what on earth inspired you to use nul
            (of all the most unlikely things) in place of a filespec parameter in
            the first place????

            Regards, John M


            ----- Original message -----
            From: "hsavage" <hsavage@...>
            To: ntb-clips@yahoogroups.com
            Date: Wed, 30 Aug 2006 00:38:10 -0500
            Subject: Re: [Clip] Getting a list of directories

            John Mitchell wrote:
            > Hello hrs
            >
            > Your example relies on the presence of "nul" in the $GetFiles command to
            > operate correctly. Where is "nul" documented? I didn't find anything in
            > either the Notetab Help or the Clipbook Help.
            >
            > Regards, John M
            >
            > P.S. Your 2nd line of code should read....
            >
            > ^!Set %sub_dirs%=^$GetFiles("+^%dir%";nul)$
            >
            > (you left off the % after ^%dir in the original)

            John,

            I seriously doubt that you find 'nul' documented anywhere unless you
            have an old version of DOS(Disk Operating System). I learned about it
            back around DOS 2 or DOS 3. I haven't seen it documented since then but
            it still is valid.

            You say the clip relies on the presence of 'nul', technically that's
            true, but null equals 0 or nothing so I guess you could it relies on the
            presence of 'nul'.

            You're right about the dropped percent(%) also and I really try hard to
            avoid things like that but, apparently it wasn't critical in this case.

            All that aside have you tried the clip? I ran it on small and large
            folders with lots of subfolders and it ran rather quickly.

            ºvº
            2006.08.30
            "One of us is thinking about sex..., OK, it's me."
            hrs ø hsavage@...
          • hsavage
            ... John, I doubt I can sufficiently relate how I thinks it works, consider it a wild card with low expectations. It looks for nothing more than if the basic
            Message 5 of 25 , Aug 29, 2006
              John Mitchell wrote:
              >
              > Yes, I tried it and yes it works. Thanks, it's a solution. I certainly
              > remember the DOS construct some DOS command > nul which could be used to
              > redirect console output to a black hole.
              > That leaves us with the use of nul in the parameter position, as in
              > ^!Set %sub_dirs%=^$GetFiles("+^%dir%";nul)$ which returns just
              > directories. The fact that it works provides me with a mechanism for
              > doing what I want but it also raises the question of *why* it works and
              > the even more pressing question of what on earth inspired you to use nul
              > (of all the most unlikely things) in place of a filespec parameter in
              > the first place????
              >
              > Regards, John M

              John,

              I doubt I can sufficiently relate how I thinks it works, consider it a
              wild card with low expectations. It looks for nothing more than 'if the
              basic path exists'. I can only say I've used it off and on for years,
              first, in the old, old days, in batch files and now in clips to verify
              folder existence without having to rely on knowing any particular filenames.

              I use it in many clips I write for my own use, as a matter of fact, I
              use one of those clips to automatically check for a particular folder
              structure every time I start NoteTab and if that structure exists the
              clip continues to set a drive variable for the drive the folders are on
              and about 10 folder variables I use to maintain and update a webpage I
              control.

              ºvº
              2006.08.30
              "One of us is thinking about sex..., OK, it's me."
              hrs ø hsavage@...
            • Jody
              Hi hsavage, ... Thanks Harvey! Don t mind if I do add it to DirStuff; already zipped and uploaded. :) It is the fastest I ve seen yet. Long line from ^!Set
              Message 6 of 25 , Aug 30, 2006
                Hi hsavage,

                >Here's something that may give you a speedy alternative to
                >
                >^$GetPath[+](FileName)$
                >^$GetDir[+]("base path")$
                >
                >I was tinkering and discovered the short clip below works really well,
                >and fast, and can be adapted to different uses, you're welcome to it for
                >your Dirstuff or any other use. I kept all the lines short and simple
                >for easy reading.
                >
                >h=listdirs
                >^!Set %dir%=^?{(T=D)Choose Folder To See FolderTree=C:\}
                ><snip>
                >^!Info [L]^%nL%^%sub_dirs%

                Thanks Harvey! Don't mind if I do add it to DirStuff; already
                zipped and uploaded. :) It is the fastest I've seen yet. Long
                line from "^!Set %dir%" to next ^!Set. I only added the output
                option and the overlooked "%" mentioned by John.

                H=HRS's ListDirs - Fast!
                ; Clip created and used with permission of HRS on ntb-Clips@yahoogroups.com
                ; Last updated on 08-30-2006 by Jody Adair, added output options.
                ^!Set %dir%=^?{(T=D)Choose Folder To See FolderTree=C:\}; %Output%=^?{Open in==_New document^=NewDoc|Information box^=}
                ^!Set %sub_dirs%=^$GetFiles("+^%dir%";nul)$
                ^!Set %sub_dirs%=^$StrReplace("" "";"^p";"^%sub_dirs%";0;0)$
                ^!Set %sub_dirs%=^$StrReplace("nul";"";"^%sub_dirs%";0;0)$
                ^!Set %sub_dirs%=^$StrSort("^%sub_dirs%";0;1;1)$
                ^!IfSame ^%Output%" "NewDoc" Skip_2
                ^!Info [L]^%nL%^%sub_dirs%
                ^!Goto End
                ^!Toolbar New Document
                ^%sub_dirs%
                ^!Jump 1


                Happy Clip'n!
                Jody

                All Lists: http://www.fookes.us/maillist.htm
                Convert your eMail programs... Aid4Mail: http://www.fookes.us/aid4mail

                Freeware and Shareware; some seamleesly integrates with NoteTab:
                http://www.sojourner.us/software

                See ya in the funnies!-) http://www.clean-funnies.com
              • junja
                I haven t tried this clip code but, from dos days, nul was necessary in lines like if exist c: somedir nul to specify one meant a dir not a file. It wasn t
                Message 7 of 25 , Aug 30, 2006
                  I haven't tried this clip code but, from dos days, "nul" was
                  necessary in lines like

                  if exist c:\somedir\nul

                  to specify one meant a dir not a file.

                  It wasn't necessary in getting a listing of dirs because the
                  dir command had a suffix for this purpose:

                  dir c: /a:d

                  IIRC.
                  John


                  John Mitchell wrote:
                  >
                  >
                  > hrs
                  >
                  > Yes, I tried it and yes it works. Thanks, it's a solution. I certainly
                  > remember the DOS construct some DOS command > nul which could be used to
                  > redirect console output to a black hole. In the context of your clip,
                  > however, nul is being used in a ^$GetFiles field whose description reads
                  > "Filespecs" and which would normally be something like "*.xls" or
                  > similar. I played around with it quite a bit. Here are my observations:
                  >
                  > If you omit the parameter, as in ^$GetFiles("+^%dir%";)$ you get an
                  > address violation (in NTB Pro 5), which I would consider to be a bug.
                  >
                  > If you make the parameter empty, as in ^$GetFiles("+^%dir%";"")$ then
                  > nothing is returned.
                  >
                  > If you make the parameter a valid filespec for a type you know does not
                  > exist in the selected directory, as in ^$GetFiles("+^%dir%";"*.xxx")$
                  > then nothing is returned.
                  >
                  > If you make the parameter a valid filespec for a type you know exists in
                  > the selected directory, as in ^$GetFiles("+^%dir%";"*.jpg")$ then a list
                  > of matching files is returned, as you would expect. It's worth noting
                  > that the list is exclusively files, even if your structure includes a
                  > directory called (e.g) mystuff.jpg.
                  >
                  > That leaves us with the use of nul in the parameter position, as in
                  > ^!Set %sub_dirs%=^$GetFiles("+^%dir%";nul)$ which returns just
                  > directories. The fact that it works provides me with a mechanism for
                  > doing what I want but it also raises the question of *why* it works and
                  > the even more pressing question of what on earth inspired you to use nul
                  > (of all the most unlikely things) in place of a filespec parameter in
                  > the first place????
                  >
                  > Regards, John M
                  >
                  > ----- Original message -----
                  > From: "hsavage" <hsavage@... <mailto:hsavage%40pobox.com>>
                  > To: ntb-clips@yahoogroups.com <mailto:ntb-clips%40yahoogroups.com>
                  > Date: Wed, 30 Aug 2006 00:38:10 -0500
                  > Subject: Re: [Clip] Getting a list of directories
                  >
                  > John Mitchell wrote:
                  > > Hello hrs
                  > >
                  > > Your example relies on the presence of "nul" in the $GetFiles command to
                  > > operate correctly. Where is "nul" documented? I didn't find anything in
                  > > either the Notetab Help or the Clipbook Help.
                  > >
                  > > Regards, John M
                  > >
                  > > P.S. Your 2nd line of code should read....
                  > >
                  > > ^!Set %sub_dirs%=^$GetFiles("+^%dir%";nul)$
                  > >
                  > > (you left off the % after ^%dir in the original)
                  >
                  > John,
                  >
                  > I seriously doubt that you find 'nul' documented anywhere unless you
                  > have an old version of DOS(Disk Operating System). I learned about it
                  > back around DOS 2 or DOS 3. I haven't seen it documented since then but
                  > it still is valid.
                  >
                  > You say the clip relies on the presence of 'nul', technically that's
                  > true, but null equals 0 or nothing so I guess you could it relies on the
                  > presence of 'nul'.
                  >
                  > You're right about the dropped percent(%) also and I really try hard to
                  > avoid things like that but, apparently it wasn't critical in this case.
                  >
                  > All that aside have you tried the clip? I ran it on small and large
                  > folders with lots of subfolders and it ran rather quickly.
                  >
                  > ºvº
                  > 2006.08.30
                  > "One of us is thinking about sex..., OK, it's me."
                  > hrs ø hsavage@... <mailto:hsavage%40pobox.com>
                  >
                  >
                • Sheri
                  Hi, For some reason it excludes folders with periods in their names. FWIW, if you do use ^$GetDosOutput()$ on a dir command such as Dir ^%dir% /b /ad /s You
                  Message 8 of 25 , Aug 30, 2006
                    Hi,

                    For some reason it excludes folders with periods in their names.

                    FWIW, if you do use ^$GetDosOutput()$ on a dir command such as

                    Dir ^%dir% /b /ad /s

                    You have to get the ^$StrAsciiToAnsi()$ of the result (unless none
                    of your folders have any special characters the name)

                    Would also need to append the "\" and add the original ^%dir% to the
                    list to otherwise match the hrs clip output (but which includes the
                    folders with dots in their names -- I had about 50 of them on my
                    drive).

                    Regards,
                    Sheri

                    --- In ntb-clips@yahoogroups.com, Jody <kjv-av1611@...> wrote:
                    >
                    > Hi hsavage,
                    >
                    > >Here's something that may give you a speedy alternative to
                    > >
                    > >^$GetPath[+](FileName)$
                    > >^$GetDir[+]("base path")$
                    > >
                    > >I was tinkering and discovered the short clip below works really
                    well,
                    > >and fast, and can be adapted to different uses, you're welcome to
                    it for
                    > >your Dirstuff or any other use. I kept all the lines short and
                    simple
                    > >for easy reading.
                    > >
                    > >h=listdirs
                    > >^!Set %dir%=^?{(T=D)Choose Folder To See FolderTree=C:\}
                    > ><snip>
                    > >^!Info [L]^%nL%^%sub_dirs%
                    >
                    > Thanks Harvey! Don't mind if I do add it to DirStuff; already
                    > zipped and uploaded. :) It is the fastest I've seen yet. Long
                    > line from "^!Set %dir%" to next ^!Set. I only added the output
                    > option and the overlooked "%" mentioned by John.
                    >
                    > H=HRS's ListDirs - Fast!
                    > ; Clip created and used with permission of HRS on ntb-
                    Clips@yahoogroups.com
                    > ; Last updated on 08-30-2006 by Jody Adair, added output options.
                    > ^!Set %dir%=^?{(T=D)Choose Folder To See FolderTree=C:\}; %Output%
                    =^?{Open in==_New document^=NewDoc|Information box^=}
                    > ^!Set %sub_dirs%=^$GetFiles("+^%dir%";nul)$
                    > ^!Set %sub_dirs%=^$StrReplace("" "";"^p";"^%sub_dirs%";0;0)$
                    > ^!Set %sub_dirs%=^$StrReplace("nul";"";"^%sub_dirs%";0;0)$
                    > ^!Set %sub_dirs%=^$StrSort("^%sub_dirs%";0;1;1)$
                    > ^!IfSame ^%Output%" "NewDoc" Skip_2
                    > ^!Info [L]^%nL%^%sub_dirs%
                    > ^!Goto End
                    > ^!Toolbar New Document
                    > ^%sub_dirs%
                    > ^!Jump 1
                    >
                    >
                    > Happy Clip'n!
                    > Jody
                    >
                    > All Lists: http://www.fookes.us/maillist.htm
                    > Convert your eMail programs... Aid4Mail:
                    http://www.fookes.us/aid4mail
                    >
                    > Freeware and Shareware; some seamleesly integrates with NoteTab:
                    > http://www.sojourner.us/software
                    >
                    > See ya in the funnies!-) http://www.clean-funnies.com
                    >
                  • John Mitchell
                    Sheri What s your definition of special characters? I tried this on a wide variety of unlikely directory names and all were correctly listed. ^!Info
                    Message 9 of 25 , Aug 30, 2006
                      Sheri

                      What's your definition of special characters? I tried this on a wide
                      variety of unlikely directory names and all were correctly listed.

                      ^!Info ^$GetDosOutput(dir c:\toplevel /ad /b /o-d)$

                      These all worked ok..

                      as+df
                      as(df
                      as&df
                      as^df
                      as$df
                      as!df
                      as df
                      as#df
                      as@df
                      as%df
                      as~df
                      as_df
                      as.df


                      ----- Original message -----
                      From: "Sheri" <silvermoonwoman@...>
                      To: ntb-clips@yahoogroups.com
                      Date: Wed, 30 Aug 2006 20:02:11 -0000
                      Subject: Re: [Clip] Getting a list of directories

                      <--- Snip --->

                      FWIW, if you do use ^$GetDosOutput()$ on a dir command such as

                      Dir ^%dir% /b /ad /s

                      You have to get the ^$StrAsciiToAnsi()$ of the result (unless none
                      of your folders have any special characters the name)

                      <--- Snip --->
                    • hsavage
                      ... Sheri, I m not sure but I think you were referring to the clip I posted in the original form and Jody s modified clip. I thought I had tested it on names
                      Message 10 of 25 , Aug 30, 2006
                        Sheri wrote:
                        > Hi,
                        >
                        > For some reason it excludes folders with periods in their names.
                        >
                        > FWIW, if you do use ^$GetDosOutput()$ on a dir command such as
                        >
                        > Dir ^%dir% /b /ad /s
                        >
                        > You have to get the ^$StrAsciiToAnsi()$ of the result (unless none
                        > of your folders have any special characters the name)
                        >
                        > Would also need to append the "\" and add the original ^%dir% to the
                        > list to otherwise match the hrs clip output (but which includes the
                        > folders with dots in their names -- I had about 50 of them on my
                        > drive).
                        >
                        > Regards,
                        > Sheri
                        >
                        >>> h=listdirs
                        >>> ^!Set %dir%=^?{(T=D)Choose Folder To See FolderTree=C:\}
                        >>> <snip>
                        >>> ^!Info [L]^%nL%^%sub_dirs%
                        >>
                        >> H=HRS's ListDirs - Fast!
                        >>
                        >> Happy Clip'n!
                        >> Jody

                        Sheri,

                        I'm not sure but I think you were referring to the clip I posted in the
                        original form and Jody's modified clip. I thought I had tested it on
                        names with periods so after your reply I re-tested, here's the result.

                        I don't know what happened but I have no trouble with either version
                        displaying foldernames with periods and other non-alpha characters in
                        the names.

                        Below is a representative sample of the same folder using the original
                        and modified clips.

                        This first sample is from the original clip.

                        C:\+r2rweb\fsGONE\
                        C:\+r2rweb\fsGONE\02001_offmarket_031112.cuttrell\
                        C:\+r2rweb\fsGONE\02002_offmarket_031112.austin\
                        C:\+r2rweb\fsGONE\02003_offmarket_031113.austin\
                        C:\+r2rweb\fsGONE\02004_offmarket_031113.crouch\
                        C:\+r2rweb\fsGONE\02005_offmarket_031113.conner\
                        C:\+r2rweb\fsGONE\02006_offmarket_031113.murphy\
                        C:\+r2rweb\fsGONE\02007_offmarket_031112.burnett\
                        C:\+r2rweb\fsGONE\02008_70,000_030128.hancock\
                        C:\+r2rweb\fsGONE\02009_offmarket_031112.fox estate\

                        This second sample is from the modified clip.

                        C:\+r2rweb\fsGONE\
                        C:\+r2rweb\fsGONE\02001_offmarket_031112.cuttrell\
                        C:\+r2rweb\fsGONE\02002_offmarket_031112.austin\
                        C:\+r2rweb\fsGONE\02003_offmarket_031113.austin\
                        C:\+r2rweb\fsGONE\02004_offmarket_031113.crouch\
                        C:\+r2rweb\fsGONE\02005_offmarket_031113.conner\
                        C:\+r2rweb\fsGONE\02006_offmarket_031113.murphy\
                        C:\+r2rweb\fsGONE\02007_offmarket_031112.burnett\
                        C:\+r2rweb\fsGONE\02008_70,000_030128.hancock\
                        C:\+r2rweb\fsGONE\02009_offmarket_031112.fox estate\

                        In this sub-folder alone there are 272 subfolders, all with periods,
                        underscores and pluses in the names and they all were written to an
                        empty file and displayed properly.

                        There must be something quite different in the instance you tried for
                        the foldernames with periods not to display correctly.

                        ºvº
                        2006.08.30
                        -Newspaper HeadLine...
                        "Old School Pillars are Replaced by Alumni"
                        hrs ø hsavage@...
                      • Sheri
                        John, Here are a few special characters I had: æ á ê é Harvey, Below are the two clips I ran; just reran on my C drive where there were fewer difference.
                        Message 11 of 25 , Aug 30, 2006
                          John,

                          Here are a few special characters I had:

                          æ á ê é

                          Harvey,

                          Below are the two clips I ran; just reran on my C drive where there
                          were fewer difference. The first clip produced 5854 lines, the
                          second 5859. I then used my "stop words" clip making the first list
                          the stop list to the second, and it produced this output:

                          C:\php\PEAR\.channels\
                          C:\php\PEAR\.channels\.alias\
                          C:\php\PEAR\.registry\
                          C:\php\PEAR\.registry\.channel.pecl.php.net\
                          C:\php\PEAR\.registry\.channel.__uri\

                          My D drive had more (as I said before about 50). They all have dots
                          in the name but maybe that's not the distinguishing characteristic.

                          Regards,
                          Sheri

                          H="listdir"
                          ^!Set %start%=^$GetDate(tt)$
                          ^!Toolbar New Document
                          ^!Set %dir%=^?{(T=D)Choose Folder To See FolderTree=C:\}
                          ^!Set %sub_dirs%=^$GetFiles("+^%dir";nul)$
                          ^!Set %sub_dirs%=^$StrReplace("" "";"^p";"^%sub_dirs%";0;0)$
                          ^!Set %sub_dirs%=^$StrReplace("nul";"";"^%sub_dirs%";0;0)$
                          ^!Set %sub_dirs%=^$StrSort("^%sub_dirs%";0;1;1)$
                          ^!InsertCode ^%sub_dirs%
                          ^!Set %end%=^$GetDate(tt)$
                          ^!Info Start: ^%start%^%NL%End: ^%End%
                          ;end of clip

                          H="DosDir"
                          ^!Set %start%=^$GetDate(tt)$
                          ^!Toolbar New Document
                          ^!Set %dir%=^?{(T=D)Choose Folder To See FolderTree=C:\}
                          ;StrTrim to get rid of empty line at the bottom
                          ;--long line start
                          ^$StrTrim(^$StrAsciiToAnsi("^$GetDosOutput(Dir ^%dir% /b /ad /s)$")$)
                          $
                          ;--long line end
                          ^!Replace "$" >> "\\" RAWS
                          ^!Jump Doc_Start
                          ^!InsertText ^%dir%^P
                          ^!Set %end%=^$GetDate(tt)$
                          ^!Info Start: ^%start%^%NL%End: ^%End%
                          ;end of clip
                        • Sheri
                          Here are a few of the differences on my D drive: D: Documents and Settings Sheri .assistant D: Program Files Microsoft
                          Message 12 of 25 , Aug 30, 2006
                            Here are a few of the differences on my D drive:

                            D:\Documents and Settings\Sheri\.assistant\
                            D:\Program Files\Microsoft Office\Templates\1033\Pages\2cmenul.tem\
                            D:\Program Files\Microsoft Office\Templates\1033\Pages\3cmenul.tem\

                            It appears that for all the rejects, the dot in the directory name
                            follows a "\" or the literal "nul"

                            Regards,
                            Sheri
                          • hsavage
                            ... Sheri, It s very curious, I don t have any folders with the listed characters, (æ á ê é), I ll create a few and try more testing. FIO, John Mitchell
                            Message 13 of 25 , Aug 30, 2006
                              Sheri wrote:
                              > John,
                              >
                              > Here are a few special characters I had:
                              >
                              > æ á ê é
                              >
                              > Harvey,
                              >
                              > Below are the two clips I ran; just reran on my C drive where there
                              > were fewer difference. The first clip produced 5854 lines, the
                              > second 5859. I then used my "stop words" clip making the first list
                              > the stop list to the second, and it produced this output:
                              >
                              > Regards,
                              > Sheri
                              >
                              > H="listdir"
                              > ^!Set %start%=^$GetDate(tt)$
                              > ^!Toolbar New Document
                              > ^!Set %dir%=^?{(T=D)Choose Folder To See FolderTree=C:\}
                              > ^!Set %sub_dirs%=^$GetFiles("+^%dir";nul)$
                              > ^!Set %sub_dirs%=^$StrReplace("" "";"^p";"^%sub_dirs%";0;0)$
                              > ^!Set %sub_dirs%=^$StrReplace("nul";"";"^%sub_dirs%";0;0)$
                              > ^!Set %sub_dirs%=^$StrSort("^%sub_dirs%";0;1;1)$
                              > ^!InsertCode ^%sub_dirs%
                              > ^!Set %end%=^$GetDate(tt)$
                              > ^!Info Start: ^%start%^%NL%End: ^%End%
                              > ;end of clip

                              Sheri,

                              It's very curious, I don't have any folders with the listed characters,
                              (æ á ê é), I'll create a few and try more testing.

                              FIO, John Mitchell pointed out, in the line - ^!Set
                              %sub_dirs%=^$GetFiles("+^%dir";nul)$ - I accidentally dropped the
                              closing percent(%) in ^%dir%, I had this - +^%dir";nul. I don't know if
                              that would cause the discrepancy in the listing or not.

                              ºvº
                              2006.08.30
                              -Newspaper HeadLine...
                              "Old School Pillars are Replaced by Alumni"
                              hrs ø hsavage@...
                            • Hugo Paulissen
                              Hi hrs, Sheri sent us this, I guess it was her... ^!Set %start%=^$GetDate(tt)$ ^!Toolbar New Document ^!Set %dir%=^?{(T=D)Choose Folder To See FolderTree=C: }
                              Message 14 of 25 , Aug 30, 2006
                                Hi hrs,

                                Sheri sent us this, I guess it was her...

                                ^!Set %start%=^$GetDate(tt)$
                                ^!Toolbar New Document
                                ^!Set %dir%=^?{(T=D)Choose Folder To See FolderTree=C:\}
                                ^!Set %sub_dirs%=^$GetFiles("+^%dir";nul)$
                                ^!Set %sub_dirs%=^$StrReplace("" "";"^p";"^%sub_dirs%";0;0)$
                                ^!Set %sub_dirs%=^$StrReplace("nul";"";"^%sub_dirs%";0;0)$
                                ^!Set %sub_dirs%=^$StrSort("^%sub_dirs%";0;1;1)$
                                ^!InsertCode ^%sub_dirs%
                                ^!Set %end%=^$GetDate(tt)$
                                ^!Info Start: ^%start%^%NL%End: ^%End%
                                ;end of clip

                                I ran the clip and it found

                                C:\Documents and Settings\Hugo\My Documents\My Music\iTunes\iTunes
                                Music\National du Thèâtre du Bolchoï\

                                without a problem!

                                Took about two minutes to display 3500 folders (I didn't know it was
                                that much).

                                Hugo




                                hsavage wrote:
                                > Sheri wrote:
                                > > John,
                                > >
                                > > Here are a few special characters I had:
                                > >
                                > > æ á ê é
                                > >
                                > > Harvey,
                                > >
                                > > Below are the two clips I ran; just reran on my C drive where there
                                > > were fewer difference. The first clip produced 5854 lines, the
                                > > second 5859. I then used my "stop words" clip making the first list
                                > > the stop list to the second, and it produced this output:
                                > >
                                > > Regards,
                                > > Sheri
                                > >
                                > > H="listdir"
                                > > ^!Set %start%=^$GetDate(tt)$
                                > > ^!Toolbar New Document
                                > > ^!Set %dir%=^?{(T=D)Choose Folder To See FolderTree=C:\}
                                > > ^!Set %sub_dirs%=^$GetFiles("+^%dir";nul)$
                                > > ^!Set %sub_dirs%=^$StrReplace("" "";"^p";"^%sub_dirs%";0;0)$
                                > > ^!Set %sub_dirs%=^$StrReplace("nul";"";"^%sub_dirs%";0;0)$
                                > > ^!Set %sub_dirs%=^$StrSort("^%sub_dirs%";0;1;1)$
                                > > ^!InsertCode ^%sub_dirs%
                                > > ^!Set %end%=^$GetDate(tt)$
                                > > ^!Info Start: ^%start%^%NL%End: ^%End%
                                > > ;end of clip
                                >
                                > Sheri,
                                >
                                > It's very curious, I don't have any folders with the listed characters,
                                > (æ á ê é), I'll create a few and try more testing.
                                >
                                > FIO, John Mitchell pointed out, in the line - ^!Set
                                > %sub_dirs%=^$GetFiles("+^%dir";nul)$ - I accidentally dropped the
                                > closing percent(%) in ^%dir%, I had this - +^%dir";nul. I don't know if
                                > that would cause the discrepancy in the listing or not.
                                >
                                > ºvº
                                > 2006.08.30
                                > -Newspaper HeadLine...
                                > "Old School Pillars are Replaced by Alumni"
                                > hrs ø hsavage@...
                                >
                                >
                                >
                                >
                                >
                                >
                                > Fookes Software: http://www.fookes.us, http://www.fookes.com
                                > Fookes Software Mailing Lists: http://www.fookes.us/maillist.htm
                                >
                                > Yahoo! Groups Links
                                >
                                >
                                >
                                >
                                >
                                >
                                >
                                >
                                >
                              • hsavage
                                ... Hugo, That s basically my clip with a couple of additions on top and bottom. I m glad it worked that well, 3,500 folders is quite a few. Don t know if it
                                Message 15 of 25 , Aug 30, 2006
                                  Hugo Paulissen wrote:
                                  > Hi hrs,
                                  >
                                  > Sheri sent us this, I guess it was her...
                                  >
                                  > ^!Set %start%=^$GetDate(tt)$
                                  > ^!Toolbar New Document

                                  > ^!Set %dir%=^?{(T=D)Choose Folder To See FolderTree=C:\}
                                  > ^!Set %sub_dirs%=^$GetFiles("+^%dir";nul)$
                                  > ^!Set %sub_dirs%=^$StrReplace("" "";"^p";"^%sub_dirs%";0;0)$
                                  > ^!Set %sub_dirs%=^$StrReplace("nul";"";"^%sub_dirs%";0;0)$
                                  > ^!Set %sub_dirs%=^$StrSort("^%sub_dirs%";0;1;1)$

                                  > ^!InsertCode ^%sub_dirs%
                                  > ^!Set %end%=^$GetDate(tt)$
                                  > ^!Info Start: ^%start%^%NL%End: ^%End%
                                  > ;end of clip
                                  >
                                  > I ran the clip and it found
                                  >
                                  > C:\Documents and Settings\Hugo\My Documents\My Music\iTunes\iTunes
                                  > Music\National du Thèâtre du Bolchoï\
                                  >
                                  > without a problem!
                                  >
                                  > Took about two minutes to display 3500 folders (I didn't know it was
                                  > that much).
                                  >
                                  > Hugo

                                  Hugo,

                                  That's basically my clip with a couple of additions on top and bottom.
                                  I'm glad it worked that well, 3,500 folders is quite a few.

                                  Don't know if it makes a difference but, in the first ^!Set %sub_dir%=
                                  line I dropped a percent when defining '^%dir'.

                                  ºvº
                                  2006.08.30
                                  -Newspaper HeadLine...
                                  "Old School Pillars are Replaced by Alumni"
                                  hrs ø hsavage@...
                                • Sheri
                                  ... characters, ... Hi again, In case there was any confusion, it is only when using ^$GetDosOutput ()$ that there s a need to convert characters. If the
                                  Message 16 of 25 , Aug 30, 2006
                                    --- In ntb-clips@yahoogroups.com, hsavage <hsavage@...> wrote:
                                    >
                                    > Sheri wrote:
                                    > > John,
                                    > >
                                    > > Here are a few special characters I had:
                                    > >
                                    > > æ á ê é
                                    > >
                                    >
                                    > It's very curious, I don't have any folders with the listed
                                    characters,
                                    > (æ á ê é), I'll create a few and try more testing.

                                    Hi again,

                                    In case there was any confusion, it is only when using ^$GetDosOutput
                                    ()$ that there's a need to convert characters. If the characters
                                    look like above in Windows Explorer, they look nothing like that
                                    when listed with a dir command in ^$GetDosOutput$ (without
                                    conversion).

                                    I know sometimes variables don't work when missing the closing
                                    percent, but I tried adding the closing parenthesis and in this case
                                    it made no difference. I also tried changing nul to NUL: in the
                                    command and it made no difference.

                                    It took me a long time to figure out how to deal with accented
                                    characters:

                                    http://groups.yahoo.com/group/ntb-clips/message/4742

                                    And the subject of a "D" attribute for ^$GetFiles$ has come up
                                    before lol.

                                    http://groups.yahoo.com/group/ntb-clips/message/4754

                                    Above posts were from 2000. I was newbie <G>

                                    Regards,
                                    Sheri
                                  • John Zeman
                                    ... Sheri don t hold me to this but I seem to recall the Microsoft command interpreter does not support unicode although XP itself does. I discovered this a
                                    Message 17 of 25 , Aug 30, 2006
                                      --- In ntb-clips@yahoogroups.com, "Sheri" <silvermoonwoman@...> wrote:

                                      > In case there was any confusion, it is only when using ^$GetDosOutput
                                      > ()$ that there's a need to convert characters. If the characters
                                      > look like above in Windows Explorer, they look nothing like that
                                      > when listed with a dir command in ^$GetDosOutput$ (without
                                      > conversion).
                                      >


                                      Sheri don't hold me to this but I seem to recall the Microsoft command
                                      interpreter does not support unicode although XP itself does.

                                      I discovered this a couple years ago when I was writing a batch file
                                      for a German friend and found out his assigned Windows codepage was
                                      quite different than mine, in what it returned.

                                      So I'm not surprised to read that ^$GetDosOutput$ can return different
                                      results for different users in different countries.

                                      John
                                    • Alec Burgess
                                      Jody: On 8/27/06, Jody wrote: NoteTabbers Assistant Library Page http://www.notetab.net/html/library.htm Direct download for
                                      Message 18 of 25 , Sep 17, 2006
                                        Jody:

                                        On 8/27/06, Jody <kjv-av1611@...> wrote:
                                        "NoteTabbers Assistant Library Page
                                        http://www.notetab.net/html/library.htm
                                        Direct download for DirStuff
                                        http://www.notetab.net/zip/dirstuff.zip"

                                        I went to get Dirstuff and noticed on that page:

                                        >>
                                        NoteTab Clipbook Library Page
                                        "Download all my libraries (.clb files for NoteTab Pro or Standard)
                                        below combined in a self-extracting file. (77kb zipped)"
                                        >>

                                        I figured I could get everything available in one fell swoop and sort
                                        it out at my leisure.

                                        That link gives a 404 - then I noticed that the drop-down link "Old
                                        Worn Out Stuff" goes to just above the above. Maybe you could add the
                                        Heading for the unwary (like me)?

                                        Any chance of a post 5.0 "All my libraries" getting created any time soon?

                                        --
                                        Regards ... Alec
                                      Your message has been successfully submitted and would be delivered to recipients shortly.