Convert MP4 to MP3
Using FFmpeg for Audacity command line tool, here’s a simple batch file that lets you drag a series of MP4 files on top of the batch file, and it will convert them all to MP3.
Using FFmpeg for Audacity command line tool, here’s a simple batch file that lets you drag a series of MP4 files on top of the batch file, and it will convert them all to MP3.
If you want to execute a batch file, but prompt the user to run it as administrator rather than making them run it as administrator upfront:
Often I use a batch file to format folders or files based on the current time. This will set a variable that is the current date/time formatted as YYYYMMDDHHMMSS:
Disable echo: Loops over fixed values: Variables: Check file existence: Check variable existence: Numeric comparison: Prompt: Labels: Numeric expression in variable: Pause: Pass all arguments to another executable: String comparison:
If you’re working in a batch file, and need some kind of user interaction in a popup window, here is a really messy and ugly way of doing it:
If you’re calling one batch file from another, and want to pass *all* of the parameters into the second one, you can use the following syntax:
You can add batch files or shortcuts to the SendTo directory in Windows, and they’re immediately available when you right-click something in File Explorer. You can use this technique to do whatever you can think of for files and directories. Here are a few basic techniques for working with batch files. View code on GitHub