Hi,
Assume that I opened a file with =FOPEN('d:\test.jpg',0)
Notice that I did not assign a variable to get the file's handle.
What commands could I use to close the file without knowing the handle?
Is there any commands where I can pass the filename in and close it?
I know the file is open by vfp as Win8 reports it as in use by vfp9 when I try to delete it at the OS level, and I'm looking for a way to close it, release it, unlock it from within vfp. If I close and restart vfp, the file can be deleted.
I've googled all over and cannot find any resource that shows how to close it, and many, many ways to test if it is open, but no way to close it if it's open.
Is there way of getting the handle to the open file?
How big is an average size handle, more than 2 digits?
Would something like this work?
x=1
do while x < 100
fclose(x) &&spinning through numbers 1-99
x=x+1
endo
What effects should I see with buffered vs unbuffered mode options for the fopen() function? Where is that discussed in detail?
Thanks,
Stanley
Assume that I opened a file with =FOPEN('d:\test.jpg',0)
Notice that I did not assign a variable to get the file's handle.
What commands could I use to close the file without knowing the handle?
Is there any commands where I can pass the filename in and close it?
I know the file is open by vfp as Win8 reports it as in use by vfp9 when I try to delete it at the OS level, and I'm looking for a way to close it, release it, unlock it from within vfp. If I close and restart vfp, the file can be deleted.
I've googled all over and cannot find any resource that shows how to close it, and many, many ways to test if it is open, but no way to close it if it's open.
Is there way of getting the handle to the open file?
How big is an average size handle, more than 2 digits?
Would something like this work?
x=1
do while x < 100
fclose(x) &&spinning through numbers 1-99
x=x+1
endo
What effects should I see with buffered vs unbuffered mode options for the fopen() function? Where is that discussed in detail?
Thanks,
Stanley