
-----------------------------------
ZeroPaladn
Tue Jan 16, 2007 1:24 pm

Making a new file...
-----------------------------------
I'm stumped on how to do this, creating a new txt file without actually having to exit the program, open and save a blank txt file (its annoying and impractical). I know how to delete one using the Kill syntax (heh), so I was thinking that maybe there was something like a Create function or something.

thanks guys

-----------------------------------
Silent Avenger
Tue Jan 16, 2007 1:49 pm

Re: Making a new file...
-----------------------------------
I'm not sure what you're actually trying to do but couldn't you just open and save a new sequential file with nothing in it?

-----------------------------------
rdrake
Tue Jan 16, 2007 2:21 pm

RE:Making a new file...
-----------------------------------
Most languages should have a New or Create function.  If you wish to save this file, look up a form of the Flush function.  It will allow you to write contents to the file and view the updated version without closing the file itself.

-----------------------------------
Monstrosity_
Tue Jan 16, 2007 5:19 pm

Re: Making a new file...
-----------------------------------
I'm stumped on how to do this, creating a new txt file without actually having to exit the program, open and save a blank txt file (its annoying and impractical). I know how to delete one using the Kill syntax (heh), so I was thinking that maybe there was something like a Create function or something.

thanks guys
Open does that for you.

If the file specified by pathname doesn't exist, it is created when a file is opened for Append, Binary, Output, or Random modes.

-----------------------------------
ZeroPaladn
Wed Jan 17, 2007 1:01 pm

Re: Making a new file...
-----------------------------------

I'm not sure what you're actually trying to do but couldn't you just open and save a new sequential file with nothing in it?

That is exactly what I'm trying to avoid. Opening a whole new file and saving it blank. I want the program to do that for me.


Most languages should have a New or Create function.  If you wish to save this file, look up a form of the Flush function.  It will allow you to write contents to the file and view the updated version without closing the file itself.

I found something like that, is this it?
Open "H:\whatever\whatever.txt" for Output as #1
I think this allows me to delete the contents of a file and re-write it, as oppose to Append where you can only add to the contents of it.


I'm stumped on how to do this, creating a new txt file without actually having to exit the program, open and save a blank txt file (its annoying and impractical). I know how to delete one using the Kill syntax (heh), so I was thinking that maybe there was something like a Create function or something.

thanks guys
Open does that for you.
I wish. Open only opens the file. It's the open type that specifies if a new file will be created. Like you said...
If the file specified by pathname doesn't exist, it is created when a file is opened for Append, Binary, Output, or Random modes.


In short, I figured it out. Thanks for the help again guys!
