Showing posts with label batch. Show all posts
Showing posts with label batch. Show all posts

Saturday, May 23, 2020

PowerShell Script for batch WAV/APE to FLAC

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
}

Friday, March 29, 2013

forfiles

Recently, I have come across a "find" like command in Windows called "forfiles".  Similar to the find command in Linux, you can use this command to locate files and execute a command on them.  Full details can be found at:

http://technet.microsoft.com/en-us/library/cc753551(v=ws.10).aspx