home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software of the Month Club 1994 October
/
SOFM_Oct1994.bin
/
pc
/
os2
/
fm2
/
cvt4os2.cmd
< prev
next >
Wrap
OS/2 REXX Batch file
|
1994-08-07
|
1KB
|
41 lines
/* Convert DESCRIPT.ION files to WPS .SUBJECT EAs */
/* I'm not terribly familiar with 4OS2 so this might */
/* not cover unusual situations (for instance, I'm */
/* guessing the format is "filename.ext description" */
/* and don't try to handle filenames with embedded */
/* spaces since I don't know how they're handled in */
/* the file (quote delimited?). Modify to taste. */
/* As written, DESCRIPT.ION file must be in the */
/* default directory. */
'@echo off'
describename = stream('DESCRIPT.ION','C','query exists')
if describename \= '' then
do
destream = stream(describename,'C','open')
if destream = "READY:" then
do
say 'Working...'
call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
call SysLoadFuncs
do while lines(describename)
text = linein(describename)
parse var text filename text
text = left(text,40)
text = strip(text)
filename = strip(filename)
if filename \= '' then
if text \= '' then
do
description = 'FDFF'x || d2c(length(text)) || '00'x || text
call SysPutEA filename,'.SUBJECT',description
end
end
call stream describename,'C','close'
'del 'describename
end
end
else
say 'File DESCRIPT.ION not found in current directory.'
exit