Link to home
Start Free TrialLog in
Avatar of eemoon
eemoon

asked on

conbine 5 file into one file in PC/win8

Hi I want to conbine five ova file into one using below command. but why the system cannot find these files? Thanks



User generated image


ASKER CERTIFIED SOLUTION
Avatar of rindi
rindi
Flag of Switzerland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of eemoon
eemoon

ASKER

Thanks for your reply! right. why it is stuck there? Is this done? I tried this several times, every time the aggregated file is gradully biger and biger. its much bigger than the sum of the five files. Please see below



User generated image


Avatar of eemoon

ASKER

Please see below. the first file is aggregated file. it become bigger and bigger. and its bigger than sum of five files


User generated image


User generated image


Probably because you already have that file in the directory (the one with 0 when you did "dir". Maybe you should first delete that one.


Besides that, these files are pretty large, & if they aren't pure text files, you may not get the result you want. As far as I can remember you can't simply combine these into 1 file.

Your prior command was including the target file as one of the input files, so never ended, it just kept adding to that file forever.

type acisim-4.2-71_part*.* > acisim-4.2-71.ova

Open in new window


But I doubt that will get you a useful file, but I don’t know what your files look like.

What are OVA files?  And how was the set of _ part files originally created?

ova files are templates you can import into VM's. Parts of them contain text that describes the VM's settings, but I think they also contain the virtual disk as well, & that would be the problem.

So how did the large single OVA file get slit into the set of smaller chunk files with the “_part” at the end of the filename?

You need to know what technique was used to do that so that you determine how to combine them. Typically I would expect som utility was used.
Avatar of eemoon

ASKER

Looks like I tested only two files aggregated into one successfully. i am adding third file into it. but this way would take much longer time to complete. especially for the last step.


User generated image


As I mentioned earlier, type can really only be used for text files. It seems that ova's are actually tar archives, & yours have been split, probably to make the file easier to download from the internet. It seems the "copy" command can handle this. It would also take the "+" which you first used with the type command (maybe you confused the two commands).


You could try


copy /B/Y *part1.ova + *part2.ova + *part3.ova + *part4.ova + *part5.ova acisim-4.2-71.ova

Open in new window

I haven't tried this myself, but it might work. 7z might also be able to rejoin the files.

You can also use the below command to merge your initial 5 files
Copy *.ova merged.ova (or whatever  you want to name it instead of merged)
since these are binary files you have to use the "copy /b" option.
Avatar of eemoon

ASKER

copy /B/Y *part1.ova + *part2.ova + *part3.ova + *part4.ova + *part5.ova acisim-4.2-71.ova

 @David, do you mean "/B" in above command? I tried, and it cannot work without /B/Y. what does it mean with /Y?

The "Y" in most commands (including "copy") is used to automatically enter "Yes" when asked to confirm an action. For example, if the destination file already exists, you would get asked whether you want to overwrite that file, and then you'd have to manually press "Y" for "Yes", or "N" for "No". With the "Y" switch you don't have to press "Y" yourself.


You can use "copy /?" to get a little help on the command, along with the switches.

Avatar of eemoon

ASKER

I conbined file together one by one, then it can conbine five file into one. all other way cannot work, I think its because the file is too big. Thanks all