Calling command line conversion with space in file name

Microsoft Windows specific usage questions
Forum rules
Please post only Windows specific questions in this forum category. If you don't know where to post, please read the different forums' rules. Thanks.
bullyellis
New Cone
New Cone
Posts: 7
Joined: 18 Jan 2011 22:20

Calling command line conversion with space in file name

Postby bullyellis » 18 Jan 2011 22:25

Hello,

I am using the following script to convert all .wma files in a given directory to mp3s.

Code: Select all

for %%a in (*.wma) do cmd /c "C:\Program Files\videoLAN\VLC\vlc" -I dummy -vvv %%a --sout=#transcode{acodec=mp3,ab=64}:standard{access=file,dst=%%a.mp3} vlc://quit
It works fine, except when there are spaces in the .wma file name. I tried adding double quotations around %%a, but still no luck. Does anyone have any ideas?

VLC_help
Mega Cone Master
Mega Cone Master
Posts: 25661
Joined: 13 Sep 2006 14:16

Re: Calling command line conversion with space in file name

Postby VLC_help » 20 Jan 2011 13:16

Something like

Code: Select all

for %%a in (*.wma) do "C:\Program Files\videoLAN\VLC\vlc" -I dummy -vvv "%%a" --sout=#transcode{acodec=mp3,ab=64}:standard{access=file,dst="%%a".mp3} vlc://quit

bullyellis
New Cone
New Cone
Posts: 7
Joined: 18 Jan 2011 22:20

Re: Calling command line conversion with space in file name

Postby bullyellis » 21 Jan 2011 15:03

That worked.

Thanks!


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: Google [Bot], Tonali01 and 14 guests