[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

Re: A question



Reply to note from "James D. Besser"  Wed, 17 Jun
1998 06:57:30 -0400

-> Hence my question: is there an XPL routine I can do to take
-> each XyWrite file and enter the filename at the beginning of
-> the file itself,

Sure, Jim. Easy. The following barebones code requires the subject
file to be open in the current window. It flips it into eXPanded
view, and inserts the filename on a separate line at top of file.
(XP and TF are function calls, produced by executing, e.g., PFUN XP
at the command line. < and > represent guillemets. The final
carriage return is required if you want the filename to have a line
to itself.) Save it to a file, and RUN it or LDPM it to a key.

XP TF >

But for 6000 files you need something more automated! Are all the
files in the same directory, or can you filter the desired files
with a DIRectory file mask? If so, something along the following
lines help. (Again, you have to make the changes noted above; the
carriage return after  should be retained in specie.)

----------


Insert filename at top of file in files in current directory [CLD]

Adjust file mask in CAll command as needed (default = *.* = ALL
files). To insert full path and filename, change the single
instance of VA$FI to VA$FP.

;*; file mask
;*;
XH BX (es 1)BX ca Q2 )>>;*;
+")">BX (d nw=3)>
SA >BX (ab/nv)==>BX (rs);*;
EN )>
----------

Let me know if this helps.


--------------
Carl Distefano
CLDistefano@xxxxxxxx
http://users.datarealm.com/ammaze/its.html