Author Topic: Descriptions for OS/2 Book files (*.INF)  (Read 4504 times)

Wendy Krieger

  • Newbie
  • *
  • Posts: 45
  • Karma: +6/-0
    • View Profile
Descriptions for OS/2 Book files (*.INF)
« on: October 08, 2021, 12:45:25 pm »
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: [Select]
/* 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'
  end
else do
  'describe' infile '"'desc'"'
  end
exit


Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 5026
  • Karma: +44/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: Descriptions for OS/2 Book files (*.INF)
« Reply #1 on: October 08, 2021, 03:43:10 pm »
Thanks for sharing Wendy.

For the moment I had added it to my "Collection of REXX scripts" in Github.
https://github.com/OS2World/CMD-Scripts/tree/master/Utilities/InfDesc

Regards
Martin Iturbide
OS2World NewsMaster
... just share the dream.