我有大约2,000个WAV文件,需要转换为优化蛙格式(OFR)。
我通常对单个目录使用以下命令:
ofr --encode --maximumcompression *.wav然而,有两个主文件夹和几百个子目录.
这将永远手动,所以我正在寻找一个自动批处理文件来做到这一点。
我看过许多例子,尝试过几个,但我不是一个程序员,我很难找到一个有用的版本。
在某种程度上,我需要扭转这一过程,并使用:
ofr --decode *.ofr发布于 2016-08-28 15:48:56
如何将多个wav转换为包含子目录的ofr?
for /r命令可用于递归访问目录树中的所有目录并执行命令。
Encode.cmd:
@echo off
rem start in the current directory (the top of the tree to visit) and loop though each directory
for /r %%a in (.) do (
rem enter the directory
pushd %%a
rem perform the required command.
ofr --encode --maximumcompression *.wav
rem leave the directory
popd
)Decode.cmd:
@echo off
rem start in the current directory (the top of the tree to visit) and loop though each directory
for /r %%a in (.) do (
rem enter the directory
pushd %%a
rem perform the required command.
ofr --decode *.ofr
rem leave the directory
popd
)进一步读:
https://stackoverflow.com/questions/39192876
复制相似问题