如何使用afconvert的所有文件转换成一个目录 - 从WAV到CAF? [英] How do I use afconvert to convert all the files in a directory from wav to caf?

查看:222
本文介绍了如何使用afconvert的所有文件转换成一个目录 - 从WAV到CAF?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有我需要转换为咖啡馆,因为AudioServicesCreateSystemSoundID()返回他们中的一些错误(但不是全部)约50 wav文件的目录。

I have a directory with about 50 wav files that I need to convert to caf, because AudioServicesCreateSystemSoundID() returns an error for some of them (but not all).

下面是我已经成功地用于单个文件的命令的例子:

Here's an example of the command I've used successfully for a single file:

afconvert -f caff -d LEI16@44100 -c 1 whistle.wav whistle.caf

如何快速做到这一点 - 不是一个接一个的每个文件

How do I do this quickly - not one-by-one for each file?

推荐答案

在Windows上,使用%〜NI 语法。

On Windows, use the %~ni syntax.

for %i in (*.wav) do afconvert -f caff -d LEI16@44100 -c 1 %i %~ni.caf

这篇关于如何使用afconvert的所有文件转换成一个目录 - 从WAV到CAF?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆