alias demo {
var %f = "C:\Path\To\Song\Song_-_title.mp3" Blah
/echo -s
/echo -s Parsed: $songFromFile(%f)
/echo -s Dir: $songFromFile(%f).Dir
/echo -s File: $songFromFile(%f).File
/echo -s Artist: $songFromFile(%f).Artist
/echo -s Song: $songFromFile(%f).Song
/echo -s
}
alias songFromFile {
if ($prop == dir) return $nofile($gettok($1-, 1, $asc(")))
else if ($prop == file) return $nopath($gettok($1-, 1, $asc(")))
else if ($prop == artist) return $gettok($nopath($gettok($1-, 1, $asc("))), 1, $asc(-))
else if ($prop == song) return $gettok($gettok($nopath($gettok($1-, 1, $asc("))), 2, $asc(-)), 1, 46)
else return $gettok($1-, 1, $asc("))
}