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

13123Re: [Clip] running a clip on all files in a directory

Expand Messages
  • Jody
    Jan 1, 2005
      Hi Steve,

      Happy New Year everyone!

      >Is there a way to run a clip on all files in a directory? I
      >think I can see a way to do it via ^!Open *.* and ^!Document
      >First|Next, but I was just wondering if there was a native
      >NoteTab way to just do it via command line, something like, say,
      >Notetab.exe MyClip.clb C:\temp\*.txt

      Only by calling a Library and Clip. Wildcards cannot be used to
      open files. You can open multiple files, but you have to list
      each file individually delimited in quotes.


      I stripped a lot of code from this taken from my DirStuff. I
      renamed the original to Open Directory... With Stats and called
      this the same (which is now in DirStuff) except for it is
      followed with Basic. The ^!Set %Folder% is one long line till the
      blank line. You can just download my DirStuff if you which.
      (There's a checkbox open for a directory also if you prefer that.
      The command-line for this would be...

      NotePro /L="DirStuff:Open Directory... Basic"

      <--- Copy below this line --->
      H=Open Directory... Basic
      ; eMailed on 01-01-2005, ntb-clips@yahoogroups.com, Jody
      ; notetab.net, clean-funnies.com, fookes.us, sojourner.us
      ; Requires NoteTab v4.83

      ^!Continue Opens all files in a folder by file type(s), with option to open subdirectories. Continue?

      ^!Set %Folder%=^?{(T=D)&Browse: full path, end in backslash}; %Subs%=^?{Do su&bfolders=Yes^=+|_No^=}; %Type%=^?{(H=10)File &Types, wildcards OK: *.txt or *.*htm*;*.txt=*.*|*.htm;*.htm*;*.*htm*|_*.txt|*.*htm*;*.txt|*.otl|*.clb|*.ini}

      ^!SetHintInfo Opening Files...
      ^!SetScreenUpdate Off

      ^!SetListDelimiter ^p
      ^!SetArray %OpenList%=^$GetFiles("^%Subs%^%Folder%";^%Type%)$
      ^!Set %Count%=^%OpenList0%
      ^!Set %Index%=0

      ^!Inc %Index%
      ^!If ^%Index% > ^%Count% End
      ^!Open ^%OpenList^%Index%%
      ^!Goto Loop

      <--- Copy above this line --->
      <--- Right click over a Library --->
      <--- Choose: Add from Clipboard --->

      NoteTabbers Assistant Page
      Directory Stuff aka DirStuff
      Sojourner's Five Wink Software
      Check out: http://www.sojourner.us/software sometime. :)

      >By the way, in code, what's the way to tell when Document Next
      >has reached the last file? I can see doing it via variables and
      >storing each filename before going Next and then comparing it to
      >see if it's the same, but is there a better way?

      ^!If ^$GetDocCount$ = ^$GetDocIndex$

      Happy Clip'n!

      www.clean-funnies.com, http://www.fookes.us/maillist.htm

      Subscribe: mailto:ntb-Clips-Subscribe@yahoogroups.com
      UnSubscribe: mailto:ntb-Clips-UnSubscribe@yahoogroups.com
      Options: http://groups.yahoo.com/group/ntb-clips
    • Show all 7 messages in this topic