Here's what I want to do:
I have thousand of split rar archives on folder name Archives. Name of the files 0001.part1.rar 0002.part2.rar 0003.part3.rar etc.
- read 0001.part1.rar
- create a directory based on prefix of the file above e.g. 0001
- move all files with the same prefix on the directory created above.
- Extract the files within that directory
- delete all rar files in that directory
- Rename the extracted file based on a list of names from a text file.
- Rar the renamed file with different arguments.
- Move the renamed file (from step 6) to a new directory called Done.
- Proceed to file 0002.part1.rar then do steps 2-8 and so forth.
Additional how would I incorporate it with cron??? This should be run once only...
After extracting the first set of rar's files change to:
file.001
file.002
file.003
etc. which I need to extract too.
Clarification on Step 6:
After extracting the second set of rar's (file.001 , file.002 etc.) I want to rename it based on a list of names from a text file.
e.g. List of files from a text file:
0001 - GB Funds.DAT
0002 - US Bonds.DAT
0003 - SG Securities.DAT
0004 - LU Credits.DAT
Clarification on Step 7:
After renaming the file I want to move it on a new folder called "Done"
Clarification on Step 9:
Go back to the main folder with all the other archives
and continue extracting the next set of archives and
do the same steps from 1 to 8.