creating an empty text file...
i basically just need a quick way to create an empty text file for output in a specified path... i thought that
Open "c:\test.txt" for Output as #1
would create one if the file didn't already exist, but i guess i was wrong...
please let me know if you have any suggestions...
thanks
tom
Re: creating an empty text file...
open "text.txt" for output as #1
close
i had checked it created a empty text file named text.txt
it worked for me it should do for u. becarefull if u already have opened a file of same number close it first.
and check if u have file creation permission in specific folder if using Windows NT.
if u re issue above command it will initilize the file. setting its size to 0 bytes.
Re: creating an empty text file...
If You use the Freefile function and a variable instead of the static #1, you are safer.
Stian
Re: creating an empty text file...
this is how i do it and it always works
Open App.Path & "\test.txt" For Binary As #1
app.path is just a property of your program it gets the path that it is running from.
Re: creating an empty text file...
An empty text file can be created simply in Notepad:
you create a new file, leave it empty and save it as test.txt in the folder you want.
Jan