Sign in with
Sign up | Sign in
Your question

Batch File Using Long Filenames

  • Windows XP
  • Audio
  • Video
  • MP3
  • Command Prompt
Last response: in Windows XP
April 29, 2013 9:07:14 AM

I am trying to write a batch file, which extracts the audio portion of a video file. It later analyses the audio MP3 to 'normalize' it. The first command is as follows:

ffmpeg -i "%1" -vn -ar 48000 -ac 2 -ab 128k -f mp3 "%~n1".mp3

The batch file works fine except when it is used on a video with a filename that contains more than one word and blank spaces. As an example, the command 'batchfile.bat Video.avi' works while 'batchfile.bat Video One.avi' does not.

I've tried a bunch of adjudtments with no luck. Anyone know how I can call a long filename?


More about : batch file long filenames

April 29, 2013 9:19:11 AM

I think in that case the filename would have to be completely encapsulated in quotes.