Code: Select all
foreach($filename, "<get SelectedItemsPathNames |>") {
$target = property("#ShortcutTarget", $filename);
delete $target;
delete $filename
}
TIA
Code: Select all
foreach($filename, "<get SelectedItemsPathNames |>") {
$target = property("#ShortcutTarget", $filename);
delete $target;
delete $filename
}
You've actually completely skipped the first two params, therefore the command has no valid itemlist, and defaults to deleting the currently focused/selected file(s).::rtfm 'idh_scripting_comref.htm#idh_sc_delete'; wrote:Code: Select all
delete [recycle=1], [confirm], [itemlist]
Code: Select all
foreach($filename, "<get SelectedItemsPathNames |>") {
$target = property("#ShortcutTarget", $filename);
delete 1, 1, $target; //all parameters must exist...
delete , , $filename; //...but they can be left empty
}Code: Select all
step;
foreach($filename, "<get SelectedItemsPathNames |>") {
$target = property("#ShortcutTarget", $filename);
if confirm("Delete these items?|$target|$filename",'|') {
delete 1, 0, $target;
delete 1, 0, $filename;
}
}