Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Opening Text Files
Message
 
 
To
11/04/2003 10:25:11
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00776573
Message ID:
00776575
Views:
12
>How can I check to see if a file (text file) exists in a folder and if it does append to it, but if it doesn't create the file and then write to it.
>
>Probably very simple, but hey its Friday.
>
>E.g
>
>If Exists(Myfile.txt)
> Open myfile for Append
>Else
> Open myfile for Output
>Endif

Ger,

You don't have to check anything if you use STRTOFILE() function.
? STRTOFILE(lcStr, "Myfile.txt", .T.)
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform