|
-
Feb 15th, 2000, 06:07 AM
#1
Thread Starter
Addicted Member
What do all these thing for opening files mean. ANd How can I Open a File Larger then 1K More Like 1M(Mp3 File Needed To Be Spliced together )
-
Feb 15th, 2000, 09:52 AM
#2
Hyperactive Member
Hi,
If you want to output data to a new file you open the file for output.
If you want to pull data in from a file you open the file for input.
Both of these will input data or output data until an end-of-file character is seen. (Hex 1A or decimal 26, i.e. Ctrl Z)
Binary files may contain an EOF character as part of their data, not meaning it's the end of the file. To input binary data you need to open the file for binary. This tells the program that hex 1A is not the end of the file and keep inputing for the length of the file, i.e. LOF.
Open a file for append if you want to add data to the end of an existing file. Open a file for random if you want to read and write to the same file. Random also indexes the records so you could read record 127, change it, and write the new data to record 127 of the same file.
I could go on-and-on but I hope you get the idea.
Al.
------------------
A computer is a tool, not a toy.
<A HREF="mailto:[email protected]
[email protected]">[email protected]
[email protected]</A>
[This message has been edited by Al Smith (edited 02-15-2000).]
-
Feb 15th, 2000, 10:30 AM
#3
Thread Starter
Addicted Member
Heres The Problem I Need to Open Like 1 Meg Files + but the evil open for input will only do 1000 I need it to do 1000000 how Can i do that
Example
File1 = INPUT(LOF(F),f) ' Wont Work With Files with over 1000Bytes.
-
Feb 15th, 2000, 05:42 PM
#4
Try this. ill hope this will work..
Dim NextData As String
InFile = FreeFile
Open "c:\Mp3.mp3" For Input As InFile
While Not EOF(InFile)
Line Input #InFile, NextData
'here you can read the lines of the file
'nextdata contains string values
Wend
Close InFile
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|