home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 35 Internet
/
35-Internet.zip
/
mr2i160.zip
/
MKFINDEX.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1998-12-01
|
1KB
|
58 lines
/* ============================================================= */
/* ============================================================= */
call RxFuncAdd SysLoadFuncs,RexxUtil,SysLoadFuncs
call SysLoadFuncs
parse arg accountName
if length(accountName) < 1 then
accountName = 'mail'
call SysFileTree accountName'\f*', 'file', 'D'
filename = accountName'\folders.ndx-new'
'del 'filename' >nul 2>nul'
idir = -1
i = 1
do while i <= file.0
pos = lastpos('\',file.i)
if pos = 0 then
pos = lastpos(' ',file.i)
fname = substr(file.i,pos+1)
path = fname
fname = accountName'\'fname'\folder.ndx'
say fName
rc = SysGetEA(fname, ".LONGNAME", "eainfo")
if rc = 0 then do
pos = lastpos("00"x,eainfo) + 1
longname = substr(eainfo,pos)
end
else longname = ""
rc = SysGetEA(fname, "MR2I.FOLDERINFO", "eainfo")
folderLine = ""
if rc = 0 then do
pos = lastpos("00"x,eainfo) + 1
folderLine = substr(eainfo,pos)
end
if length(folderLine) < 5 then do
if length(longname) > 0 then
folderLine = longname
else folderLine = path
folderLine = folderLine''path''path'N0'
end
rc = lineout(filename,folderLine)
i = i + 1
end
return 0