foreach
and then doing a curitem_dos
to get the short paths/names, but I'd like to be able to get this without resorting to having to have each file selected individually for each query.Specifically, what I'm doing is getting around the filename/commandline limitations of my media player (PotPlayer) by creating a playlist (XSPF) in
%TEMP%
, that includes both the Short Name for a target item (location) and the normal filename base as the Title (title), then opening that with the player.Code: Select all
"Make XSPF Playlist and Open : xspf"
$q = chr(34);
$lt = chr(60);
$gt = chr(62);
$xspf = "$lt".'?xml version='."$q".'1.0'."$q".' encoding='."$q".'UTF-8'."$q".'?'."$gt".<crlf>."$lt".'playlist version='."$q".'1'."$q".' xmlns='."$q".'http://xspf.org/ns/0/'."$q"."$gt".<crlf>.' '."$lt".'trackList'."$gt".<crlf>.' ';
foreach ($file, <selitems |>, "|") {
selectitems $file;
$xspf = $xspf."$lt".'track'."$gt".<crlf>.' '."$lt".'title'."$gt".<curbase>."$lt".'/title'."$gt".<crlf>.' '."$lt".'location'."$gt".<curitem_dos>."$lt".'/location'."$gt".<crlf>.' '."$lt".'/track'."$gt".<crlf>.' ';
}
$xspf = $xspf."$lt".'/trackList'."$gt"."$lt".'/playlist'."$gt".<crlf>;
writefile("%temp%\xy\playlist.xspf", $xspf,"o", "utf8bom");
open "%temp%\xy\playlist.xspf";
end 1==1;