如何转换多个
wav
到
ofr
包括子目录?
for /r
编码.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
)
解码.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
)
进一步阅读:
-
for /r
-循环浏览文件(Recurse子文件夹)。
-
pushd
-更改当前目录/文件夹并存储以前的文件夹/路径,以供POPD命令使用。
-
popd
-将目录更改回PUSHD命令最近存储的路径/文件夹。