how to test the exsitance of a file?
 
 
 
PST User Forum
Home       Members    Calendar    Who's On
Welcome Guest ( Login | Register )
        



how to test the exsitance of a file? Expand / Collapse
Author
Message
Posted 10/23/2007 2:03:53 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 6/9/2008 3:35:09 PM
Posts: 8, Visits: 26
if the file doesn't exists, create it
if the file exists, append to the same file

I'm using something like the following:
on error goto FileError
open filename for input as nfilename
......
exit sub
FileError
......

but it has errors saying "datafile can't convert" if the file exists; runs fine when the file doesn't exists and needs to be created.
Any other way to test whether a file exists?
Post #732
Posted 10/23/2007 2:22:44 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 6/9/2008 3:35:09 PM
Posts: 8, Visits: 26
found it
Dir(Filename) <> ""

However I wonder whether there is a manual or something with all the available commands listed? The user's guide of E-prime doesn't has much information about e-basic. I would like to know for example, what functions are associated with Slide object, what are some general functions, what are c. functions and so on......
Post #733
Posted 10/24/2007 9:14:22 AM
Forum MVP

Forum MVPForum MVPForum MVPForum MVPForum MVPForum MVPForum MVPForum MVP

Group: Administrators
Last Login: Yesterday @ 9:26:59 AM
Posts: 576, Visits: 1,254
You can use the FileExists function.

You can find additional information in the E-Basic help which is available from the help menu or by pressing F1 while active in an InLine or User Script window.  Topics of note to look at in the Index after clicking the Help Topics button would be...
{key} nomenclature
Object Structure
InputMask Object
Slide Object

-Brandon

Post #737
« Prev Topic | Next Topic »


Permissions Expand / Collapse

All times are GMT -5:00, Time now is 7:05am

Powered By InstantForum.NET v4.1.4 © 2009
Execution: 0.125. 13 queries. Compression Disabled.