HI, Mike. That's how I do it. I put all my development work as sub
directories to the RBTI\RBG95_64 folder. Some are double quotes, others
are single. I run an RBASE.DAT file to set the correct quotes, switch to
the correct directory and issue a CONNECT command. I also set a custom
scratch directory, but please ignore that.
*************************************************
SET NULL -0-
SET ERROR MESSAGES OFF
MKDIR C:\RBTI\RBScratch
SET ERROR MESSAGES ON
SET SCRATCH C:\RBTI\RBScratch
SET ERROR MESSAGE 2077 OFF
DELETE C:\RBTI\RBScratch\*.*
SET ERROR MESSAGE 2077 ON
SET QUOTES=NULL
SET QUOTES='
CLEAR VAR v%
DISCONNECT
SET VAR vChkFile INTEGER = (CHKFILE('RBDAT.RX1'))
IF vChkFile = 0 THEN
CREATE SCHEMA AUTHOR `RBDAT` NONE
CREATE TABLE `DirList` ( +
`Col01` TEXT (12), +
`Col02` TEXT (8), +
`Col03` TEXT (8), +
`Col04` TEXT (8), +
`DirName` TEXT (200))
ELSE
CONNECT RBDAT
DELETE FROM DirList
ENDIF
OUTPUT DirList.txt
DIR *.
OUTPUT SCREEN
SET ERROR MESSAGES OFF
LOAD DirList FROM DirList.txt
SET ERROR MESSAGES ON
DELETE FROM DirList WHERE Col04 <> '<DIR>' OR DirName IN ('.','..')
SET VAR vLines INTEGER
SELECT COUNT(*) INTO vLines FROM DirList
CHOOSE vDirectory +
FROM #VALUES FOR DirName FROM DirList ORDER BY DirName ASC +
TITLE 'R:Base 9.5 (64)' +
CAPTION 'Select System' +
LINES .vLines +
FORMATTED +
OPTION WINDOW_CAPTION SMALLINT +
|TITLE_BACK_COLOR WHITE +
|TITLE_FONT_NAME Tahoma +
|TITLE_FONT_SIZE 12 +
|TITLE_FONT_COLOR BLACK +
|TITLE_BOLD ON +
|TITLE_ITALIC OFF +
|TITLE_UNDERLINE OFF +
|TITLE_STRIKEOUT OFF +
|LIST_BACK_COLOR WHITE +
|LIST_FONT_NAME Tahoma +
|LIST_FONT_SIZE 10 +
|LIST_FONT_COLOR BLACK +
|LIST_BOLD OFF +
|LIST_ITALIC OFF +
|LIST_UNDERLINE OFF +
|LIST_STRIKEOUT OFF +
|WINDOW_BACK_COLOR WHITE
CHDIR .vDirectory
CONNECT
RETURN
***********************************************
On 09/07/2014 4:21 PM, Michael J. Sinclair wrote:
Hi All,
Is there a way to check to see if there are any PDF files (or any
other specific extension) in a folder? or better yet get a count of
the number of files based on a file extension in a folder?
As of now, I capture the output of the DIR command and extract the
information form the output.
Is there a better way?
Mike