Skip to content
86% off$349 $48.86code BF2026

Guides

Auto-Convert WAV in a Folder and Subfolders on Mac

Convert WAV files automatically in a folder and its subfolders on Mac, without catching half-copied files. A free afconvert script and Gizmojar watch folders.

GuideUpdated 7 min read

On this page

You have a folder of WAV files, with subfolders, and new ones keep arriving. You want each one converted to AIFF or M4A on its own, without renaming extensions and without the converter grabbing a big file halfway through a copy.

Why it goes wrong

  • Rename is not conversion. Changing the extension changes only the name. The audio data inside is still WAV, and apps that trust the extension may fail on it.
  • Half-copied files. A watcher that fires on "new file appears" can start while a large file is still being copied, especially over a network. People who run always-on watchers report exactly this. The fix is a settle delay: only touch a file once its size and modification date have stopped changing.
  • Top-level only. Many watchers and Folder Actions look at one folder level. Subfolders need either a recursive search or a depth setting.
  • Always-on cost. A watcher that polls constantly uses resources. A short check on a timer is lighter.
  • Output limits. afconvert and Gizmojar write AIFF, WAV, AAC and M4A, not MP3 or FLAC.

Pick a method

MethodSubfoldersWaits for a finished copyOutputCost
afconvert script + launchdAny depthYes, skips files modified in the last minuteAIFF, M4A and others; you choose sample rate and bit depthFree, built in
Gizmojar watch folderUp to 5 levelsYes, Wait until unchanged 2 s to 1 minM4A, AAC, WAV, AIFF$349 MacSuite bundle, 7-day trial (as of November 2026)
Permute 4Not verifiedNot verifiedNot verified$14.99 one-time; needs macOS 26 and Apple silicon (as of November 2026)

Pick the script if you want free, exact control, such as 16-bit/48 kHz AIFF, and don't mind Terminal. Pick Gizmojar if you want a visible on/off switch and a per-folder log. Hazel, Folder Actions and XLD also come up when people ask this question; we have no verified notes on them, so check their own sites. For Permute, see the Permute vs Gizmojar comparison.

Method 1: afconvert and launchd

This converts every .wav under a folder, subfolders included, and writes the .aiff next to the original. It ignores files modified in the last minute and never deletes or changes your WAVs.

  1. Create a folder to watch, for example ~/Audio/Incoming.
  2. Save this as ~/bin/wav-to-aiff.sh (create bin if needed):
bash
#!/bin/bash
WATCH="$HOME/Audio/Incoming"

find "$WATCH" -type f -iname '*.wav' -mmin +1 -print0 |
while IFS= read -r -d '' f; do
  out="${f%.*}.aiff"
  [ -e "$out" ] && continue
  tmp="${out%.aiff}.tmp-$$.part"
  if afconvert -f AIFF -d BEI16@48000 "$f" "$tmp" </dev/null; then
    mv -n "$tmp" "$out"
  else
    rm -f "$tmp"
  fi
done

find walks all subfolders for WAVs last modified more than a minute ago. afconvert writes 16-bit, 48 kHz AIFF to a temporary file, renamed into place only if conversion succeeded. Files that already have an .aiff are skipped, so reruns are harmless.

  1. Make it executable:
bash
chmod +x ~/bin/wav-to-aiff.sh
  1. Test by hand. Copy a few WAVs in (one in a subfolder), wait two minutes, run ~/bin/wav-to-aiff.sh, and check the AIFFs. Change BEI16@48000 to the bit depth and rate you need, or drop @48000 to keep the source rate.
  2. Save this as ~/Library/LaunchAgents/local.wav-to-aiff.plist, replacing YOURNAME (paths must be absolute):
xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
  <key>Label</key><string>local.wav-to-aiff</string>
  <key>ProgramArguments</key>
  <array><string>/Users/YOURNAME/bin/wav-to-aiff.sh</string></array>
  <key>StartInterval</key><integer>60</integer>
</dict>
</plist>
  1. Load it:
bash
launchctl bootstrap gui/$(id -u) ~/Library/LaunchAgents/local.wav-to-aiff.plist

To undo, run launchctl bootout gui/$(id -u) ~/Library/LaunchAgents/local.wav-to-aiff.plist and delete the plist.

The job runs a short check every 60 seconds instead of keeping a process open, and starts again at each login. On a very large tree, raise StartInterval so the scan runs less often.

Output M4A instead

Replace the afconvert line with:

bash
afconvert -f m4af -d aac "$f" "$tmp"

Then use .m4a for out, ${out%.m4a}.tmp-$$.part for tmp, and change the [ -e "$out" ] check to match.

Output MP3 or FLAC

afconvert is not the tool for MP3. ffmpeg, installed separately (for example with Homebrew), can write MP3 and FLAC. You would swap its command into the same script.

Method 2: a Gizmojar watch folder

Gizmojar watches a folder, runs each new audio file through a recipe, and only after the file has stopped changing. It needs macOS 14 Sonoma or later. You build a one-step recipe first, because the built-in recipes don't include an audio conversion.

  1. Choose File ▸ Recipes & Watch Folders… (⇧⌘R).
  2. On the Recipes tab, create a recipe. Set Name to "WAV to AIFF" and Starts with: to Audio.
  3. Add a Convert step, open Options…, and set Format: to AIFF (choices: M4A (AAC), AAC (ADTS), WAV, AIFF; M4A is the default). Click Done, then Save Recipe (⌘S).
  4. Open the Watch Folders tab, click Add Folder…, choose your folder and pick the recipe.
  5. In the folder's options, set Subfolders: to "5 Levels Deep" (or fewer). The default, "Top Level Only", ignores subfolders.
  6. Set Wait until unchanged: to 15 s or 1 min for large files or network copies. Choices: 2 s (default), 5 s, 15 s, 1 min.
  7. Make sure the folder is Active, then turn on Open at login in Settings ▸ General, because watching works only while Gizmojar is running.

How it behaves:

  • Files are processed one at a time, after size and date stop changing. Hidden items and partial downloads (Safari .download bundles, .crdownload, .part, .partial, .tmp, .opdownload, .icloud) are always skipped.
  • Results go into a Gizmojar Results subfolder of the watched folder, which is always skipped so results never retrigger. The script above writes each AIFF next to its WAV instead. Test a few files in a nested folder to see the layout.
  • Originals are never changed.
  • The recipe starts with Audio, so it isn't limited to WAV. If the folder options show an Only: extension filter, set it to wav; otherwise keep the watched folder WAV-only.
  • Files already in the folder when watching starts, or added while paused, are left alone. To convert a backlog, drop the folder on the command bar and run your recipe or the audio Convert tool with Format: AIFF. Folders are scanned recursively and saved as <Folder> (Gizmojar) next to the original, with the same subfolders. If the folder holds other media, pick Audio in the "Per kind" bar first.

Gizmojar is part of MacSuite and free for 7 days. At $349 for the bundle (as of November 2026) it is overkill if audio conversion is all you need. More in the Gizmojar watch folders docs.

Troubleshooting

SymptomCauseFix
Nothing convertsOnly new files countConvert the backlog once (drop the folder on the command bar, or run the script by hand)
Subfolders ignoredSubfolders: is "Top Level Only", or folders are deeper than 5 levelsRaise the depth; the script has no limit
Big file converted too earlySettle delay too shortSet Wait until unchanged: to 1 min, or raise -mmin +1 to -mmin +3
Stops after restartGizmojar not runningTurn on Open at login
Pauses on a laptopPause when the Mac is hot or in Low Power Mode (Settings ▸ Advanced) is on by defaultWait, or turn it off
Script does nothingMissing chmod +x, YOURNAME left in the plist, wrong WATCH pathRun it in Terminal and read the error

A copy that stalls for longer than the delay can still slip through either method.

If Gizmojar shows "Gizmojar can't access this folder — allow it in System Settings ▸ Privacy & Security ▸ Files and Folders", the folder is in Desktop, Documents, Downloads, or on a removable or network volume. Allow access; the folder is paused until then and resumes on its own.

Checklist before you try again

  • The watched folder exists and the path in the script or Gizmojar is right.
  • Subfolder depth is set (Gizmojar) or find points at the top folder (script).
  • The settle delay is longer than your slowest copy pauses.
  • You tested with two or three files, including one in a subfolder.
  • Gizmojar is running and the folder is Active.

If nothing works

For Gizmojar, use the support page. Include your macOS version, the folder's location (local, network or removable), the Subfolders: and Wait until unchanged: values, and the watch folder log text.

text
Subject: Watch folder not converting WAV files in subfolders

Gizmojar version: (from About Gizmojar)
macOS: 
Watched folder: (path, local/network/external)
Recipe: Convert, Format AIFF, starts with Audio
Subfolders: 5 Levels Deep; Wait until unchanged: 15 s
What happens: new WAVs in subfolders are not converted.
Log message: (paste from the Watch Folders log)
Already tried: re-saving the recipe, pausing and resuming the folder.

Common questions

Does renaming a WAV to AIFF work?

No. Only the name changes. The file is still WAV inside, and apps that trust the extension may fail on it.

Can Gizmojar output MP3 or FLAC?

No. Audio output is M4A, AAC, WAV or AIFF. Use ffmpeg for MP3 or FLAC.

Will my originals be deleted?

Not by the script above, and Gizmojar never changes originals.

Does a watcher use a lot of resources?

The script runs a brief check every 60 seconds rather than staying open. Gizmojar keeps running in the background and holds watch folders when the Mac is hot or in Low Power Mode, if that setting is on.

Every app.
One purchase.