Thanks.
Trying to edit the script.
Code: Select all
/*
******************************************************************************
@Author : IT Services & Consulting Ulf Kohlmorgen
@Created : 2022-01-14 20:03:13
@Modified: 2022-01-14 20:09:47
@Function: Copyto, moveto, backupto to tab folders
@Tags : <empty>
@Version : v0.1
******************************************************************************
*/
$iconFolder = ":showfolders";
$iconCopy = ":copyto";
$iconMove = ":moveto";
$iconBackup = ":backupto";
$selectedItems = <get SelectedItemsPathNames |>;
end (!$selectedItems), "No item(s) selected, aborted!";
$folders = "";
if (get("#800")) { $folders .= get("tabs", <crlf>, "i"); }
$folders .= <crlf> . get("tabs", <crlf>);
$folders = formatlist($folders, "esdF", <crlf>, "!" . <curpath>);
$path = input("Source path Edit: $selectedItems", ,<get path>,"w" , , 1000, 200);
$menu = "";
$indent = <space 4>;
$last = "";
while ($folders) {
$folder = gettoken($folders, 1, <crlf>);
$folders = gettoken($folders, 2, <crlf>, , 2);
if ($folder != $last) {
$caption = gpc($folder, "component", -1);
$menu .= <crlf> . $caption . "<:><:>" . $iconFolder;
}
$data = ""copyto "$folder\$path","$selectedItems", , 2;
$menu .= <crlf> . $indent . "Copy <selected items> here...<:>" . $data . "<:>" . $iconCopy;
$data = "moveto " . quote($folder) . ", " . quote($selectedItems) . ", , 2;";
$menu .= <crlf> . $indent . "Move <selected items> here...<:>" . $data . "<:>" . $iconMove;
$data = "backupto " . quote($folder) . ", " . quote($selectedItems) . ", , 2;";
$menu .= <crlf> . $indent . "Backup <selected items> here...<:>" . $data . "<:>" . $iconBackup;
$last = $folder;
}
$selection = popupnested($menu, 6:=<crlf>, 7:="<:>");
if ($selection) { load $selection, , "s"; }