Thank you Albert. This rocks! So clean, with no unwanted junk. I never
would have thought of this one.

[EMAIL PROTECTED] wrote: -----

To: [email protected] (RBG7-L Mailing List)
From: Albert Berry <[EMAIL PROTECTED]>
Sent by: [email protected]
Date: 04/07/2005 12:34AM
Subject: [RBG7-L] - Re: Capturing a listing of files in a directory and
importing it into Rbase

Try this. Then select the columns to want.


OUTPUT TempFile.txt
DIR *.PDF
OUTPUT SCREEN
DROP TABLE TmpImport
CREATE TEMP TABLE TmpImport ( +
 ShortName TEXT (8),  +
 Extension TEXT (3),  +
 FileSize INTEGER,  +
 FileDate DATE,  +
 FileTime TEXT (8), +
 LongName TEXT (256))

LOAD TmpImport FROM TempFile.TXT
EDIT ALL FROM TmpImport

INSERT INTO SomePermTable +
 SELECT LongName, FileDate, (FileTime + "M") +
 FROM TmpImport

RETURN

--- [EMAIL PROTECTED] wrote:
---------------------------------
>From the does anyone have a better way department:

I have a need to capture file names (to process in rbase) from a designated
directory. The names
will always be a static format and length, but will change (file0001.txt ,
file0002.txt...). Only
files that need processing will be in the directory. My thought was to:

output tempfile.txt
dir
output scr

use the gateway command to import into a temporary table and use declare
cursor and (sget(.vTemp)
to capture the filenames. Is there a better way? I'm always afraid that
I've missed a function
that will do what I want very easily. Thanks for you help.

Albert Berry
Management Consultant
RR2 - 1252 Ponderosa Drive
Sparwood BC, V0B 2G2
Canada
(250) 425-5806
(250) 425-7259
 (708) 575-3952 (fax)
[EMAIL PROTECTED]

Reply via email to