This is a little script I use for batch converting ape files in a folder into flac.
#!/bin/bash
for f in *.ape
do
mac "$f" "${f%.*ape}.wav" -d && flac --best "${f%.*ape}.wav" && rm "${f%.*ape}.wav"
done
This is a little script I use for batch converting ape files in a folder into flac.
#!/bin/bash
for f in *.ape
do
mac "$f" "${f%.*ape}.wav" -d && flac --best "${f%.*ape}.wav" && rm "${f%.*ape}.wav"
done
This is a script I use for converting any WAV/APE files in a folder to FLAC.
$files = Get-ChildItem -Recurse -path . -filter *.ape
foreach ($file in $files) {
$path = Split-Path -Path $file.FullName
$new_name = [IO.Path]::GetFileNameWithoutExtension($file) + ".wav"
$new_name = Join-Path $path $new_name
mac $file.FullName $new_name -d
}
$files = Get-ChildItem -Recurse -path . -filter *.wav
foreach ($file in $files) {
flac --best $file.FullName
}
Get-ChildItem . -recurse -File -filter *.txt* | % {[System.IO.File]::WriteAllLines is used instead of the more commonly used Out-File because the latter outputs UTF8-BOM instead of plain UTF.
$MyFile = Get-Content -Raw $_.Fullname
$MyPath = $_.Fullname
[System.IO.File]::WriteAllLines($MyPath, $MyFile, [System.Text.UTF8Encoding]($False))
}