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

Re: [Clip] clip to run directory and make index

Expand Messages
  • Jody
    Hi Don, ... Ooh, so clever! :) ... I edited a line in one of my clips in DirStuff. I did not do a bunch of HTML because I figured you would want to do that.
    Message 1 of 3 , Apr 4, 2001
    • 0 Attachment
      Hi Don,

      >Example if I have a directory called "Directory"

      Ooh, so clever! :)

      >containing files "index.html" "greatpage.asp" and "badpage.htm",
      >it would run directory and make a file called index.html which
      >has clickable links in an unordered list (or whatever) to the
      >three pages, using relative links.

      I edited a line in one of my clips in DirStuff. I did not do a
      bunch of HTML because I figured you would want to do that. Look
      above About WinZip for a Clip called: Make HTML Index... It has
      a bunch of unneeded stuff that you can take out, but it is not
      hurting anything. See the notes below about where to do your
      HTML at.

      H=Make HTML Index...
      ; Last updated on 04-04-2001, Sojourner@..., jody
      ; http://www.notetab.net/zip/dirstuff.zip
      ^!Set %Dir%=^?{(T=D)&Directory}; %Subs%=^?{&Include Sub-directories (v4.83 or better)=Yes^=+|_No^=}; %Types%=^?{File &type(s) *.txt;*.htm*;*.dll;*.exe=*.htm*}; %Attr%=^?{&Attributes, A: Archive, H: Hidden, R: Read-only, S: System=_All^=*|AHRS}; %Sort%=^?{&Sort order=Date|Name|Size|_Type|UnSorted}; %Rev%=^?{&Reverse sort order=Yes^=Rev|_No^=}; %NewDoc%=^?{&Output for time, etc.=Infobox|_New Document^=1}
      ^!Set %TimeStart%=^$GetDate(nn:ss)$
      ^!SetHintInfo Getting Directory Information...
      ^!SetArray %FileList%=^$GetFiles("^%Subs%^%Dir%";^%Types%;^%Attr%;^%Rev%^%Sort%)$
      ^!Set %Count%=^%FileList0%
      ^!Set %Index%=0; %FileCount%=0
      ^!Toolbar New Document

      ^!Inc %Index%
      ^!If ^%Index% > ^%Count% Stats
      ^!Set %FileName%=^%FileList^%Index%%

      ; This is the link. Just add the HTML that you want on each link.
      <a href="../^$GetFileName("^%FileName%")$">^$GetName("^%FileName%")$</a>^%nl%
      ^!Inc %FileCount%
      ; may go a tad bit faster if next line ;commented, especially on large folders /ja
      ^!SetHintInfo ^%FileCount%
      ^!Goto Loop

      ^!SetHintInfo Standby... It might take awhile; path\files being parced
      ^!IfTrue ^%NewDoc% Skip_3
      ^!SetWizardTitle ~^$StrFill(" ";60)$ http://www.notetab.net ^$StrFill(" ";66)$~
      ^!Info [L]Total files: ^%FileCount%^pTotal size: ^%TotalSize%^%pv%^p^p^%Files%
      ^!Goto End
      ; the reason it takes some time after the New doc is made and
      ; the files being inserted is because NoteTab passes the lines
      ; of text off to Windows for parsing - doing many folders with
      ; lots of files takes some time /ja (per Eric Fookes)
      ^!Set %CollectDone%=^$GetDate(nn:ss)$
      ^!Toolbar New Document
      ^!InsertText Total files: ^%FileCount%^p^p^%Files%^p^$GetDate(C)$^pCollection Start: ^%TimeStart%^pCollection End: ^%CollectDone%^p
      ^!Jump 1
      ; The above just gives you some stats and below goes back to the list.
      ^!Document Prev
      ; Do a Document to HTML here or jump 1 and paste the heading
      ; stuff and jump doc_end for the footer. If you add to this
      ; file then adjust the links to HTML
      ^!Save As

      Happy Clip'n!


      Subscribe, UnSubscribe, Options
    Your message has been successfully submitted and would be delivered to recipients shortly.