Code: Select all
// Position of the XYplorer inputselect() window
$xPos = 200;
$yPos = 150;
$rememberPositionExe = "D:\Tools\Remember XYplorer inputselect window.exe";
// ========================================================================
// == DO NOT CHANGE ANYTHING BELOW IF YOU DO NOT KNOW WHAT YOU ARE DOING ==
// ========================================================================
$winTitle = "XYplorer inputselect";
end (<get countselected> == 0), "No item(s) selected, aborted!";
$dstFolder = inputfolder(, "Choose folder where the .jpg(s) reside");
$prefix = gettoken($dstFolder, -1, "\");
$jpgFiles = listfolder($dstFolder, "*.jpg", 1+4, <crlf>);
end (!$jpgFiles), "No .jpg file(s) found in destination folder, aborted!";
if (exists($rememberPositionExe) == 1) {
run """$rememberPositionExe"" $xPos $yPos ""$winTitle""";
}
$menu = regexreplace(<get SelectedItemsNames <crlf>>, "^(.+?)(\.[^.]+?)(?=\r?\n|$)", "$1");
foreach($jpgFile, $jpgFiles, <crlf>, "e") {
// Set focus to make it available in the preview pane...
$jpgPaneContent = listfolder($dstFolder);
sel gettokenindex($jpgFile, $jpgPaneContent);
colorfilter($jpgFile . ">FFFFFF,00FF00");
#1012; // Move focused item into view
$suffix = inputselect("Suffix for $jpgFile", $menu, <crlf>, 4+32+4096+8192+16384, "not_named", 400, 600, $winTitle);
if ($suffix LikeI "not_named") { continue; }
renameitem("$prefix $suffix", $dstFolder . "\" . $jpgFile, 1, "-01");
}
copytext "QUIT";
XYplorer Beta Club