New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Batch join .001 files?
I have tons of .avi.001 in my homemade clips folder. How to batch join them?
I try
cat a.avi.* > a.avi
It works fine but it takes much time to do 1 by 1.
Example: i have
a.avi.001 a.avi.002 a.avi.003
b.avi001 b.avi.002 b.avi.003
c.avi.001 c.avi.002 c.avi.003
How to join
a.avi.001 a.avi.002 a.avi.003 to a.avi
b.avi001 b.avi.002 b.avi.003 to b.avi
c.avi.001 c.avi.002 c.avi.003 to c.avi
with 1 command or bash. I dont want to type each command for each movie
Comments
hjsplit?
hjsplit for linux? can it help me bactch join in one command?
http://lxsplit.sourceforge.net/
Did you read my first post?
I know how to split and merge file. cat, hjsplit,... can do it.
But what i want to know is how to batch join files.
i can't remember, sorry. And i was using it only for merging two files max.
you can do this in 2 stages, which is best if you want to be cautious.
First, you need a list of the files you're trying to recreate, get this with -
this should take a list of all files, chop the .nnn extensions off and find the unique values - so the file '.filelist' should contain a list of your target files - check it carefully. I've made .filelist a hidden file so it doesn't get listed in the file itself. You should get something like -
Alternatively, you could produce this file by hand. Now use a for loop with your original cat command -
the echo -n . line is optional, but its a quick way to see some progress - you'll get a . for each complete concatenation.
Its possible that if your source files aren't named strictly according to your convention that this will screw up - check your results before you delete the source files
If you're very brave, you can stick the first command in place of
cat .filelist
in the 2nd command.