Batch file recursively find files and rar them
Posted
by b1gf00t
on Stack Overflow
See other posts from Stack Overflow
or by b1gf00t
Published on 2010-06-13T21:35:58Z
Indexed on
2010/06/13
21:42 UTC
Read the original article
Hit count: 155
Hi there,
I have a Parent Directory which hosts many sub directories, and in every sub directory there is .mpg movies. Some of the directories might contain one or more .mpg movies.
I would like to automate the process below, which I have been doing manually.
Step One
If the directory has more than 1 .mpg file, I create separates directories for each and move each file into its directory, naming the directory as per the name of the file.
Step Two
I rar each video file in its directory as per one of my profiles, by that it splits the movie into 50MB parts, test the archive, delete the source, and instructs winrar to wait if another rar is executing. I am doing this so I can queue jobs manually.
Step Three
After having all the rars in the sub directories, I start creating a checksum for every directory, therefore leaving checksum.sfv in every directory.
Step Four
I copy the parent folder and its sub directories to my external drives.
I was hoping that someone could assist me in creating a script. I was able to automate the process of creating directories as per the name of the file, and moving the file. However, I never succeeded in automating Step two.
I am using the below software
- Winrar from rarlabs
- exf from exactfile
Appreciate your assistance.
© Stack Overflow or respective owner