|
-
Aug 7th, 2000, 06:56 AM
#1
Thread Starter
Hyperactive Member
Is it posssible (i think it should) to open multiple files, i keep getting a file already open warning even though i have give different file id for each file, CAN ANYONE HELP?
Many Thanks
-
Aug 7th, 2000, 07:13 AM
#2
Fanatic Member
Of course it is possible to have multiple files open. I have done it many times myself. I take it you are using the FreeFile function to return a file number.
The error sounds like another program is using the file, or that you have opened it before and not closed it.
Good luck.
Iain, thats with an i by the way!
-
Aug 7th, 2000, 07:26 AM
#3
Thread Starter
Hyperactive Member
OPEN FILE
ExecCmd ("cmd /c ""dir e:\netvespaweb >e:\Centra~1\Cabini~1\DirectoryFolder.txt /s /b /a:d""")
'Create a file with file listings
ExecCmd ("cmd /c ""dir e:\netvespaweb >e:\Centra~1\Cabini~1\FileFolder.txt /s /b """)
Open "e:\Centra~1\Cabini~1\DirectoryFolder.txt for Output as #2
Open szNameCabIni For Input As nCabIniID
Why do i get the error when freefile is used for th nCabIniID?
Many Thanks
-
Aug 7th, 2000, 08:39 AM
#4
Thread Starter
Hyperactive Member
mmmmH
What i want to do is open a file, open another, then write contents of one file to another file so i would like both files open.
"As anybody got a clue, what to do..." BLOCK BUSTER...!!!
D'oh..!!
-
Aug 7th, 2000, 12:07 PM
#5
transcendental analytic
As Iain said use Freefile to locate next free filenumber. You should use this number in all operation with that file so store them in variables as follows:
Code:
Dim ff1 as integer, ff2 as integer
ff1 = freefile
open file1 as input as ff1
ff2 = freefile
open file1 as input as ff2
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
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
|