我想实现一个简单的脚本来在我的媒体电脑上做一些无聊的家务,但我不确定哪种脚本语言适合这项任务。
我想做的伪代码是:
1) Scan a directory for sub directories matching a name like:
"Foo 1x01 bar"
"Foo 1x02 bar"
or
"Foo s01e01 bar"
"Foo s01e02 bar"
2) Then for each matching sub directory:
- Make a directory "Foo" if it doesn't already exist.
- Copy the largest file under the matching sub directory into "Foo".
- Delete the matched sub directory and anything left in it.
就是这样。尽管我可能想扩展它以随着时间的推移做更多的事情。对于用于此任务的最优雅的脚本工具有什么建议吗?
谢谢