Merging two files...

I have 2 huge files (several GB each file) on the hard disk and I would like to merge them by changing the FAT entries and EOF of the files on the partition FAT so they become one file.
I DO NOT WANT to perform a binary read of one file and append it to the other one.
Can anyone help please?

Thank you in advance.
BigBossAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
rspahitzConnect With a Mentor Commented:
Well, it's been a while, I thought I'd done it years ago by simply changing the sector pointers.

Before I lose any credit for this, I'd like to know why BigBoss has not even responded to my comments.
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
Listening & Learning
I guess this isn't possible, when memory serves me right. I had once some lessons about FAT, and i think this could only work in some specific cases (the file fills the blocks on the disk completely, ie the size of the file is an exact multiple from the block size the disk is formatted... )

If nobody can provide that answer, you might use the DOS copy command for append:
copy file1 + file2 file3

CHeers
0
 
Richie_SimonettiIT OperationsCommented:
hearing... (i am with angelIII)
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
rspahitzCommented:
I haven't done anything like that since DOS 2, but I suppose the answer is to simply change the link bytes at the end of the chain on the first file and have it point to the start of the chain in the next file, then update the length in the FAT.  I really have no clue how to do that these days, but there's probably an API call to access the FAT, and some low-level command to update disk bytes...or simply use something like Norton Utilities to change the bytes.
0
 
Richie_SimonettiIT OperationsCommented:
You could open files in binary mode and append each other but, that doesn't guarantee that you could play the wav files...
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
Richie: who is speaking of WAV files?
0
 
Richie_SimonettiIT OperationsCommented:
:)))), wrong question!!!
I did switch questions, posting this where to be in other, and posting other here...
Sorry, sometimes is time to go to bed.
0
 
rspahitzCommented:
Is this a one-time effort, or will it be ongoing?  For a one-time effort, just do the append the simple way, either what you stated ("perform a binary read of one file and append it to the other one") or as angelIII suggested (copy file1 + file2 file3)

If this will be an on-going issue, I think it is too dangerous to try to change the FAT.  For this scenario, I suggest looking into where these files come from and figure out how to merge them as they're created.
0
 
BigBossAuthor Commented:
Hello everybody....
Thank you all for your comments.
As I mentioned in my question, I don't want to use a read-and-append method.
I will wait for a couple of days...probably somebody will provide a solution.

Regards to all.
0
 
Richie_SimonettiIT OperationsCommented:
"....
As I mentioned in my question, I don't want to use a read-and-append method.
...."
Then, why don't you use angelIII's comment?
0
 
BigBossAuthor Commented:
>>>Then, why don't you use angelIII's comment?
Richie_Simpnetti; what is the difference between the read-and-append method and the method proposed by angell???
Do you know what does the "copy file1 + file2 file3" do???
0
 
rspahitzCommented:
I agree, BigBoss, but I hope you'll comment on my previous paragraph:

"If this will be an on-going issue, I think it is too dangerous to try to change the FAT.  For this scenario,
I suggest looking into where these files come from and figure out how to merge them as they're created."
0
 
DanRollinsCommented:
Hi BigBoss,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Accept rspahitz's comment(s) as an answer.

BigBoss, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
0
 
BigBossAuthor Commented:
DanRollins,
Thank you for your comment.
In fact, the question has not been answered.
So please delete it.
Thank you.
0
 
DanRollinsCommented:
BigBoss,  Thanks for returning to this question.  I see that you currently have six open Questions, some of which are getting pretty old.  Please try to finalize your open questions.

In the future, if you want to delete a question, post a 0-pt question to Community Support and ask for help.  However, for this particular question, you will not need to take any further actions -- a Moderator will take care of it within about 1 week.  I am changing my recommendation to:

   DELETE this question.
==========
DanRollins -- EE database cleanup volunteer
0
 
rspahitzCommented:
I repeat:

...simply use something like Norton Utilities to change the bytes.

Since this generally cannot be done through Windows, you only hope is to use or write DOS app that directly access the disk hardware.

Q answered AGAIN.
0
 
DanRollinsCommented:
rspahitz,
If anyone is correct here it is angelIII's "It can't be done post"  Because there is no way that tweeking the FAT will work unless the file data for the first file happens to coincide with the cluster size.  That means that any FAT-manipulation technique can only be successful on average about one time in 8,000 (or 16K or 32K).
-- Dan
0
 
DanRollinsCommented:
Good point rspahitz, BigBoss has a clear tendancy to post many questions and then abandon them.  I've never run across such a situation before :o  You might consider adding a comment here:
http://www.experts-exchange.com/Community_Support/Q_20452887.html
-- Dan
0
 
SpideyModCommented:
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.