Mikus Grinbergs wrote:
Try sticking this lot in a .cmd file and running it from a command line:
/* Get straight to the Mozilla user directory */
env = "OS2ENVIRONMENT"
mozhome = 'VALUE'("MOZILLA_HOME",,env)
IF mozhome = "" THEN mozhome = 'DIRECTORY'()
mozhome = 'STRIP'(mozhome,'T',"\")"\"
CALL 'SysFileTree' mozhome"*.SLT", "slt.", "SDO"
SAY slt.0 "users"
user. = ""
user.0 = 0
DO i = 1 TO slt.0
last_bs = 'LASTPOS'("\",slt.i)
short = 'LEFT'(slt.i,last_bs-1)
last_bs = 'LASTPOS'("\",short)
u = user.0 + 1
user.u = 'SUBSTR'(short,last_bs+1)
user.0 = u
END
IF user.0 = 1 THEN CALL 'DIRECTORY'(slt.1)
ELSE DO
DO i = 1 TO user.0
SAY "" user.i
END
SAY "Enter user:"
PARSE PULL user
DO i = 1 TO user.0
IF user.i = user THEN CALL 'DIRECTORY'(slt.i)
END
END
EXIT
Please note that it is by no means fully tested, and certainly not
guaranteed to do anything other than consume a small amount of disk
space, but it works here. I'll listen to helpful and constructive
comments telling me it doesn't work, but no whining!
Graham.