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?
Printable View
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?
hmmm..
What the hell do you want man :)Quote:
without having to open it and cycle through each and every character and appending them?
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
You may want to look at this thread for more info about reading very large textfiles
http://forums.vb-world.net/showthrea...threadid=34646
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
I did some searching around, and you can Shell the DOS Copy command to copy 2 files into a third file.
So, you could use this to append 2 files together without having to open them in VB.Code:Private Sub Command1_Click()
Shell ("command.com /c copy c:\file1.txt + c:\file2.txt c:\file3.txt")
End Sub
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 # :D
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.
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 :)
kedaman:
Smart A__ :D LOL
Later, going to get someone to slap me and wake me up!
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 :p
Hey that's what I said hehe :)
My post wasn't meant as an attack, just a correction.
:D
Were just like immitating the Dennis-Wrenn style :)
That means Smart Ass time!
hmm... haven't seen him in a while... DENNIS COME BACK!