I am dabbling with Powershell and attempting to replace the old console 'for' command. For instance, to encode a folder of *.WAV files using "FLAC.EXE" which is located on the path:
(Get-ChildItem)|Where-Object{$_.extension -eq ".wav"}|flac "$_.Name"
However I get a result where clearly Flac is not receiving the file name and only the literal string "$_.Name".
This is a very obvious problem I am sure, but I am still feeling my way along at this stage.