February 17, 2006
From the Edge: Using GetFileSize.RBL Plugin
Section: Using Plugins
Chapter: Running R:BASE Your Way!
Platform: R:BASE 7.5 and V-8 Turbo for Windows
Supported Builds: R:BASE 7.5 (7.5.24.30214 or higher)
R:BASE V-8 Turbo (8.0.12.30214 or higher)
Syntax:
PLUGIN GetFileSize.RBL varname|FileName.ext
Where:
varname is the variable to return the text value of a given
file name
FileName.ext is the actual name and extension of file name
and extension, preceding by full path.
Notes:
. Returned variable name and the exact file name with path
must be separated by "|" pipe symbol
http://www.rupdates.com/rbg75 (R:BASE 7.5 for Windows)
http://www.rupdates.com/rbg8 (R:BASE V-8 Turbo)
Example:
-- Start
CLEAR VAR vCaption,vPauseMessage,vFileSizeTxt,vFileSize, +
vFileName
SET VARIABLE vCaption TEXT = +
'Using GetFileSize Plugin with R:BASE 7.5'
SET VARIABLE vPauseMessage TEXT = NULL
SET VARIABLE vFileSizeTxt TEXT = NULL
SET VARIABLE vFileSize INTEGER = NULL
SET VARIABLE vFileName TEXT = 'C:\RBTI\RBG75\RBG75.EXE'
SET VARIABLE vCommandString = +
('PLUGIN GetFileSize.RBL vFileSizeTxt|'+.vFileName)
&vCommandString
SET VARIABLE vFileSize = .vFileSizeTxt
- Do what you have to do with the actual vFileSize variable
CLS
SET VARIABLE vPauseMessage = +
('File Name:'+(CHAR(009))+(CHAR(009))&.vFileName+ +
(CHAR(009))+(CHAR(013))+ +
'File Size:'+(CHAR(009))&(CTXT(.vFileSize)))
CLS
PAUSE 2 USING .vPauseMessage CAPTION .vCaption +
ICON APP +
BUTTON 'Yes, this is the R:BASE you have always wanted!' +
OPTION BACK_COLOR WHITE +
|MESSAGE_COLOR WHITE +
|MESSAGE_FONT_COLOR GREEN +
|BUTTON_COLOR WHITE
CLS
CLEAR VAR vCaption,vPauseMessage,vFileSizeTxt,vFileSize, +
vFileName
RETURN
-- End
A PDF document of this article is also available at:
From The Edge: http://www.razzak.com/fte
Topic: Using GetFileSize.RBL Plugin
Enjoy and make sure to have fun!
Very Best R:egards,
Razzak.