home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mega Top 1
/
os2_top1.zip
/
os2_top1
/
APPS
/
FILEMAN
/
FM2UTILS
/
CVT4OS2.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1994-09-24
|
2KB
|
49 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 and will be deleted when done. */
/* Also note that I'm told that 4OS2 has commands */
/* that allow it to retrieve the file description */
/* for you -- it might be best to use those instead */
/* of reading the DESCRIPT.ION file directly. */
'@echo off'
call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
call SysLoadFuncs
rc = SysFileTree('DESCRIPT.ION','dummy','F','*****','**---')
describename = stream('DESCRIPT.ION','C','query exists')
if describename \= '' then
do
destream = stream(describename,'C','open')
if destream = "READY:" then
do
say 'Working...'
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'
/* done; delete file. remove next line if that's not what you want. */
'del 'describename
end
end
else
say 'File DESCRIPT.ION not found in current directory.'
exit