I did as suggested and Wine complained about it not being able to find the exe file, turns out you need to put in the full path.
However now it complains:
ERROR: Z:“path with file name”.“extension”: File not found
The pathname it gives has escape slashes instead of forward slashes too.
This looks like a wine issue, it looks like it’s trying to put the file in a virtual Z drive?
EDIT: It was a qaac issue, once i put in the -d option for the output directory (-d $source) it actually encodes.
EDIT 2: It encodes but now creates weird recursive directory in it’s output.
It creates a file in the source directory named the same as the song name with the encoded extension (e.g. “tracknumber title.m4a”) which is actually a directory with the following subdirectory structure leading to the actual file.
/home/<username>/<music directory>/<format>/<album artist>/<album>/<file>
Which matches my normal $path setting but is not outputting at the “root” so to speak but recreating the whole structure within it.