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.
我有一个父目录,其中包含许多子目录,并且在每个子目录中都有.mpg电影。某些目录可能包含一个或多个.mpg电影。
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.
如果目录有超过1个.mpg文件,我创建每个文件的分隔目录并将每个文件移动到其目录中,根据文件名命名目录。
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.
我根据我的一个配置文件将每个视频文件放在其目录中,通过它将电影分成50MB部分,测试存档,删除源,并指示winrar等待另一个rar正在执行。我这样做,所以我可以手动排队工作。
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.
在子目录中包含所有rars之后,我开始为每个目录创建校验和,因此在每个目录中都会保留checksum.sfv。
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
来自rarlabs的Winrar
来自exactfile的exf
Appreciate your assistance.
感谢您的帮助。
2 个解决方案
#1
3
This is supposed to be a question and not a description of task for someone to do instead of you. Try to define a problem and edit your post to show obstacles. This will find more support here in this case.
这应该是一个问题而不是某人的任务描述而不是你。尝试定义问题并编辑帖子以显示障碍。在这种情况下,这将获得更多支持。
#2
2
Step 1
Get Windows Powershell
获取Windows Powershell
Step 2
Write a script, to do what you need. If you get stuck, ask a specific question
写一个脚本,做你需要的。如果您遇到困难,请询问具体问题
#1
3
This is supposed to be a question and not a description of task for someone to do instead of you. Try to define a problem and edit your post to show obstacles. This will find more support here in this case.
这应该是一个问题而不是某人的任务描述而不是你。尝试定义问题并编辑帖子以显示障碍。在这种情况下,这将获得更多支持。
#2
2
Step 1
Get Windows Powershell
获取Windows Powershell
Step 2
Write a script, to do what you need. If you get stuck, ask a specific question
写一个脚本,做你需要的。如果您遇到困难,请询问具体问题