Try this:
SET VAR vFileIsThere INT = (CHKFILE('filename'))
IF vFileIsThere = 1 THEN
-- open the file
ELSE
-- make your new file
ENDIF
"Walker, Buddy" <[EMAIL PROTECTED]> wrote:
>Have you tried using the FINDFILE(filename) to search for the file.
>
>Buddy
>
>-----Original Message-----
>From: David Atkinson [mailto:[EMAIL PROTECTED]]
>Sent: Sunday, August 26, 2001 5:12 AM
>To: RBase List
>Subject: Checking for a filename
>
>
>Ever get a day when your brain decides to go delinquent ?
>
>Table Actions records actions/activities the DBOwner wishes to record using
>columns cliID, empID, cnID,acDate,acActivity,acNotes,acID,acDateTime
>
>The columns determine which client, which company employee, which client
>employee, the date, the activity, ('phone call to/from'...) plus any short
>notes...
>
>Many entries are DB generated as the owner creates say Quotations, Invoices,
>Receives Payments and so on, rows are posted saying what was done.
>
>Should the company have written to the client, Table DocsFile enable
>document Filenames to be linked via cliID. There can be many filenames for
>each one client. DocsFile appears as a region on Form Actions.
>
>I wish to use the LAUNCH from within form Actions.
>The user selects the Client, moves to the DocsFile region, Clicks on a
>filename which is placed in a variable vacfile.
>Clicks pushbutton OPEN THAT FILE which runs OpenFile.eep and runs the
>LAUNCH command.
>Provided the filename exists LAUNCH works just fine.
>
>I also wish provide the option to create a New Filename from within
>form Actions, Region DocsFile before even launching Word or Excel.
>That filename is posted into clipboard (works fine) and can be copied from
>clipboard into Filename, when user chooses FILE - SAVE AS. It will also
>form part of 'Our Reference:' within the WORD/EXCEL document.
>
>This gives me 2 possibilities
>1. ZIP START WINWORD/EXCEL would launch the programme and the user would
>be
>instructed to immediately to save the filename using Cliboard.
>2. Create the new filename then LAUNCH to it.
>
>Here's where brain gets the giggles...
>
>How do I check in advance if the WORD/EXCEL filename exists or not ?
>If_it_does - LAUNCH would apply
>If_not - Create New or ZIP START would apply.
>
>I've been looking at CHOOSE and #LFILES but haven't resolved a method
>foolproof for users of any ability.
>
>Any fresh thoughts would be a great help
>
> David Atkinson
>skidbusters.co.uk
>
>[EMAIL PROTECTED]
>
>
__________________________________________________________________
Your favorite stores, helpful shopping tools and great gift ideas. Experience the
convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/
Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/