Hi Everybody,
I was trying to write a jbase subroutine which will return the size of the
directory i am passing to the subroutine. But i want this subroutine to be
used in both Unix and windows
machines. if there is any jbase command then it will be much useful
Can you please help me to complete this routine???
SUBROUTINE GET.SIZEOF.DIR(PATH,DIR.SIZE)
$INSERT I_COMMON
$INSERT I_EQUATE
CMND = ''
OUTPUT.VAR = ''
OP.SYSTEM = "UNIX"
IF OP.SYSTEM EQ "UNIX" THEN
CMND = "du -sh ":PATH
END ELSE
* CMND = "null" ????????????????? Is
there any command in DOS / jbase or any dos script ?
END
EXECUTE CMND CAPTURING OUTPUT.VAR
TRIMMED.OUT = TRIM(OUTPUT.VAR,'',"D")
SIZE.VAR = FIELD(TRIMMED.OUT,PATH,1)
DIR.SIZE = TRIM(SIZE.VAR,'',"D")
RETURN
END
jbase :- Jbase 5.1
Os :- Windows Server 2003
T24 relaese :- r09
Thanks in advance
Rahul
--
Please read the posting guidelines at:
http://groups.google.com/group/jBASE/web/Posting%20Guidelines
IMPORTANT: Type T24: at the start of the subject line for questions specific to
Globus/T24
To post, send email to [email protected]
To unsubscribe, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/jBASE?hl=en