Page 1 of 1

Delete+

Posted: 05 Aug 2015 11:55
by eil
Originally this script was inspired by this idea. I always felt lack for few enchantments to "delete" procedure in XY, so this script went quite further in term of abilities.

What it does:
- gives full size of items to be deleted
- states drive letter or determines if more then one drive in action
- makes a dialogue warning if items to be deleted are on non-hard drive
    - makes additional beep-sound warning
- makes a dialogue warning if there are tagged/labeled items among those to be deleted(includes all sub-items)
    - makes additional beep-sound warning
    - proposes to view list of tagged/labeled items


It can be used as a button, but i just put it through UDC to {Delete} key. Now my delete operations is greatly safer = much less situations with accidentally deleted important info. 8) Hope it can be useful to somebody else.

v3:
- Paper Folder support, not delete but remove items(with save, for case of Explicit Save Only enabled)
Delete+_v3.xys
v2:
- little optimizations
- when it's only one item, question window additionally shows the name
- tagged/labeled items are shown in paper folder Explicit Save mode = no actual writing of temp-data to hard-drive
Delete+_v2.xys
v1:
delete+.xys

Re: Delete+

Posted: 06 Aug 2015 01:48
by klownboy
Hi eil, nice idea and thanks for the script. One minor suggestion. When you are just deleting one file, why not specify the filename to be deleted in the dialog box like Windows does instead of you're about to delete "one" item X MG from drive X:. For deletion of multiples files keep it as you currently do. Thanks.

Re: Delete+

Posted: 06 Aug 2015 06:27
by eil
klownboy wrote:why not specify the filename to be deleted in the dialog box like Windows does
not hard to add this, i just didn't see a need for it = usually if i delete even less than few files i see them/their names.

Re: Delete+

Posted: 06 Aug 2015 13:08
by klownboy
It's certainly not a big deal though sometimes it's nice as a final check to see the filename in the dialog to make sure it's the right one you're about to delete. Thanks.

Re: Delete+

Posted: 07 Aug 2015 00:21
by eil
though i won't change the initial file, here is your wish klownboy. :)
change line

Code: Select all

 $ques = "You're about to delete $num items <crlf>$grandsize from = $drive<crlf 2>$warning$warning2 Continue?";
with this

Code: Select all

 if ($num == 1) {$num = <crlf 2>.getpathcomponent($item, "file")}
	else {$num = $num." items"};	
 $ques = "You're about to delete $num <crlf>$grandsize from = $drive<crlf 2>$warning$warning2 Continue?";

Re: Delete+

Posted: 07 Aug 2015 13:23
by klownboy
Thanks for the modification eil.