Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Truncating a Dat File
Message
From
25/07/2003 09:33:37
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00813467
Message ID:
00813469
Views:
7
>Hi all
>I am wanting to be able to clear out a dat file.
>
>This is the code I have so far, but it ain't working =|
>Since I did not a know way to just clear the contents I am trying to get the file to just truncate to 0
>But if you have a better way Please tell me =)
>
>
>gcCsvName = getfile('DAT', 'Clear Dat:')
>
>if empty(gcCsvName)
>	return 0
>else
>    gnCsvFile  = fopen(gcCsvName)
>    fchsize(gnCsvFile, 1)
>    fclose(gnCsvFile)
>endif
>
FCREATE will auto erase the file and make it size zero.
Charles

"The code knows no master." - Chuck Mautz
"Everybody is ignorant, only on different subjects." - Will Rogers
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform