Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sequential Files
#1
I save stuff to sequential files but i'd like to put them in specific folders or locations and i can't figure out how. Any body that could help me can email me at atsolberg@csbsju.edu. Thanks a bunch!
Reply
#2
Please pose a question
Reply
#3
You can make a sequential file in a folder by adding the folder to the filename. For example:

Code:
OPEN "c:\qbasic\folder1\filename.txt" FOR OUTPUT AS #1
  PRINT #1, "Now there's some text in the file."
CLOSE #1

or, you could do this:

Code:
INPUT "What do you wish to name your file? ", filename$
INPUT "What folder do you wish to put it in? ", folder$
OPEN folder$ + "\" + filename$ FOR OUTPUT AS #1
  PRINT #1, "Now there's some text in the file!"
CLOSE #1

Hope that helps!

*peace*

Meg.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)