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

Re: [Clip] Need list of subdirectories

Expand Messages
  • hsavage
    ... Michael, Charles, Each method, so far, has at least one shortcoming. If you choose not to read all subdirs the final display didn t show the entire path.
    Message 1 of 11 , Feb 13, 2006
    • 0 Attachment
      > Date: Sat, 11 Feb 2006 20:46:33 -0500
      > Subject: [Clip] Re: Need list of subdirectories
      > From: Michael Frascinella <mfrascinella@...>
      >>
      >> Hi,
      >>
      >> This clip intrigued me so I added it to my File Operations library.
      >> Thank you for such creativity.
      >> It's sad that you had to resort to DOS to get the folder information.
      >> Having used ^$GetFiles for other clips, it would be an excellent
      >> addition to NoteTab to have a ^$GetFolders command.
      >>
      >> As a technical writer, I added some instructions to the clip that you
      >> all have developed. I also included an ^!Info command before and after
      >> the string replace so as to provide the folder list in two formats.

      >> ; 2-11-06 from ntp-clips discussion group dated Feb. 9-10, 2006
      >>
      >> ; show the subfolders with full paths in the Info box
      >> ^!Info [L]Subfolders of ^%folder% including the paths^p^pCut and paste
      >> to a file if needed.^p^p^%list%

      >> ; show only the subfolder names in the Info box
      >> ^!Info [L]Subfolders of ^%folder% without the paths^p^pCut and paste to
      >> a file if needed.^p^p^%list%

      >> Michael F
      >> Never Forget
      >> September 11, 2001
      >> ******************

      Michael, Charles,

      Each method, so far, has at least one shortcoming. If you choose not to
      read all subdirs the final display didn't show the entire path. With a
      little string manipulation that's overcome. This, to, is assuming one
      would want the entire path.

      This version produces 2 lists in the same output. The first list shows
      the output of the chosen folder, including those deeper is 'subs' is
      'YES', the additional output shows the entire path regardless of whether
      'subs' is chosen.

      The output can be directed in several different ways, 2 examples are shown.

      <>··········Separator··········<>
      H="Dirnames"
      ;_ Modified-Updated~Created_20060213
      ;_ hrs ø hsavage·pobox·com_09:38:56a
      ; - long line
      ^!Set %folder%=^?{(T=D)Pick Folder To Disassemble=C:\}; %subs%=^?{List
      ALL SubDirs?==YES^=/s|_NO^=}
      ; - long line
      ^!Set %path_full%=^%nl%^$StrTrim(^$GetDosOutput(dir/ad/b/on^%subs%
      "^%folder%")$)$
      ;
      ^!Set %path_part%=^$StrReplace("^%folder%";"";"^%path_full%";0;0)$
      ; - long line
      ^!If '^%subs%' <> '/s' ^!Set
      %path_full%="^$StrReplace("^%nl%";"^%nl%^%folder%";"^%path_full%";0;0)$"
      ;
      ^!SetWizardTitle ^$StrUpper("--^%folder%-- dirs WITH & W/O fullpath")$
      ^!Set %pp%="Partial path Listing =^%nl%"
      ^!Set %fp%="Full path Listing =^%nl%"
      ^!SetClipBoard ^%pp%^%path_part%^%nl%^%nl%^%nl%^%fp%^%path_full%^%nl%
      ;
      ; - 2 methods for displaying result
      ;^!ToolBar PASTE NEW
      ^!Info [L]^$GetClipboard$
      <>··········Separator··········<>

      --
      ºvº
      06.02.13
      "Do These Jeans Make My Bum Look Big? - Why Men Lie."
      hrs ø hsavage@...
    Your message has been successfully submitted and would be delivered to recipients shortly.