|
-
Nov 14th, 2000, 03:46 AM
#1
Thread Starter
Lively Member
Hello,
Does anyone know a way to append an ENTIRE file to another without having to open it and cycle through each and every character and appending them?
Daniel Rose
VB 5.0 Enterprise.
irc:irc2.dynam.ac
If TheCodeInTheSig() Is Not Lame() Then IDontKnowWhatIs()
-
Nov 14th, 2000, 07:31 AM
#2
Frenzied Member
hmmm..
without having to open it and cycle through each and every character and appending them?
What the hell do you want man
Jop - validweb.nl
Alcohol doesn't solve any problems, but then again, neither does milk.
-
Nov 14th, 2000, 08:01 AM
#3
Addicted Member
Why not?
This may sound like a silly question, but why don't you like the idea of loading the file into a string?
As far as I know, a string can hold up to 2 Gigs of data. That can handle a very large file. And even if the file is bigger than that, why not just split it up into two or more parts (read only half the file at a time).
I cannot imagine a user waiting for a 2Gig file to be read and written byte by byte.
Just askin'
Shrog
-
Nov 14th, 2000, 08:15 AM
#4
Frenzied Member
You may want to look at this thread for more info about reading very large textfiles
http://forums.vb-world.net/showthrea...threadid=34646
Jop - validweb.nl
Alcohol doesn't solve any problems, but then again, neither does milk.
-
Nov 14th, 2000, 08:32 AM
#5
Fanatic Member
Just curious
Not sure if this is possible, but surely someone knows. From VB, could you execute the DOS "COPY" command to copy 2 files into a third file? That would append the two files together.
In DOS: COPY c:\file1.txt + c:\file2.txt c:\file3.txt
-
Nov 14th, 2000, 09:47 AM
#6
Fanatic Member
If anyone is interested
I did some searching around, and you can Shell the DOS Copy command to copy 2 files into a third file.
Code:
Private Sub Command1_Click()
Shell ("command.com /c copy c:\file1.txt + c:\file2.txt c:\file3.txt")
End Sub
So, you could use this to append 2 files together without having to open them in VB.
-
Nov 14th, 2000, 10:03 AM
#7
_______
<?>
Jop:
HeSaidJoe, you're code is somewhat sloppy (in hurry? tired?
All of the above, but # is not a requirement.
If you tested my code you know it works with or without #
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Nov 14th, 2000, 10:23 AM
#8
Frenzied Member
hehe sorry, I didn't knew that...
But try to be consequent, use either FreeFile OR #1.
Use either #intNum OR intNum
'cause it's kinda confusing (I'm tired too ya know )
Bye.
Jop - validweb.nl
Alcohol doesn't solve any problems, but then again, neither does milk.
-
Nov 14th, 2000, 10:24 AM
#9
transcendental analytic
Hehe, you forgot one thing though, you used Get #1 not Get #intnum 
The compromise between byte by byte and whole file is of course reading in chunks
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.
-
Nov 14th, 2000, 10:29 AM
#10
_______
<?>
kedaman:
Smart A__ LOL
Later, going to get someone to slap me and wake me up!
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Nov 14th, 2000, 10:33 AM
#11
transcendental analytic
Hehe, i'm used to be attacked myself for that kinds of trivial stuff, especially when it gets as late as 6:00am or so
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.
-
Nov 14th, 2000, 10:37 AM
#12
Frenzied Member
Hey that's what I said hehe 
My post wasn't meant as an attack, just a correction.
Jop - validweb.nl
Alcohol doesn't solve any problems, but then again, neither does milk.
-
Nov 14th, 2000, 10:43 AM
#13
transcendental analytic
Were just like immitating the Dennis-Wrenn style 
That means Smart Ass time!
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.
-
Nov 14th, 2000, 10:54 AM
#14
Frenzied Member
hmm... haven't seen him in a while... DENNIS COME BACK!
Jop - validweb.nl
Alcohol doesn't solve any problems, but then again, neither does milk.
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
|