OS/2, eCS & ArcaOS - Technical > Programming

Descriptions for OS/2 Book files (*.INF)


Wendy Krieger:
I wrote this little rexx script, to describe .INF files under 4OS2, 4DOS and 4NT.

It basically extracts the title from the INF file, strips the '00'x bits and tells the 4os2 session this is the file.  At the moment it handles only one file at a time, which means that you run "select infdesc (*.inf)" at the command prompt.

It can tickle some bugs in regina.rex (os2), in that if the description has no spaces, the program will read it as two files, and under 4NT, the files have quotes around them, which 4DESC does not like.  But generally it works quite well.

--- Code: ---/* rexx */
parse arg infile
call stream infile, 'c', 'open read'
desc = charin(infile, 108, 48)
call stream infile, 'c', 'close'
desc = strip(desc,'B','00'x)
if desc = '' then do
  say infile' has no title'
else do
  'describe' infile '"'desc'"'

--- End code ---

Martin Iturbide:
Thanks for sharing Wendy.

For the moment I had added it to my "Collection of REXX scripts" in Github.



[0] Message Index

Go to full version