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

Re: [Clip] Get List of Dirs

Expand Messages
  • hsavage
    ... chs, This is the clip with slight mods to let you select whether to see Dirs Only or Dirs/Files. Keep in mind, the clip is setup to always look as subdirs
    Message 1 of 2 , Aug 31 8:37 PM
    • 0 Attachment
      chsulka wrote:
      > hrs' GetListofDirs clip w/ mods by Jody works great!
      >
      > I was wondering how to add an option, "Show Files?" so the whole
      > directory tree could be displayed instead of just the dirs?
      >
      > chs

      chs,

      This is the clip with slight mods to let you select whether to see Dirs
      Only or Dirs/Files. Keep in mind, the clip is setup to always look as
      subdirs so unless you really need it bad I would be careful not to try
      getting a listing from a very large foldertree.

      There is one very long line that will get wrapped in email, there's a
      blank line above and below it and take care when unwrapping that line.+

      ------------------------
      H="HRS's List Dirs - Dirs/Files!"
      ; 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:\};
      %which%=^?{Show Dirs or Dirs/Files==_Dirs Only^=nul|Dirs/Files^=*.*};
      %Output%=^?{Open in==_New document^=NewDoc|Information box^=}

      ^!Set %sub_dirs%=^$GetFiles("+^%dir%";^%which%)$
      ^!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
      ----------------------

      ºvº
      2006.08.31
      -Newspaper HeadLine...
      "Panda Mating Fails; Veterinarian Takes Over"
      hrs ø hsavage@...
    Your message has been successfully submitted and would be delivered to recipients shortly.