Delete+

Discuss and share scripts and script files...
Post Reply
eil
Posts: 1866
Joined: 13 Jan 2011 19:44

Delete+

Post 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
To see the attached files, you need to log into the forum.
Last edited by eil on 20 Apr 2023 09:23, edited 5 times in total.
Win 7 SP1 x64 100% 1366x768|1900x1080

klownboy
Posts: 4459
Joined: 28 Feb 2012 19:27
Location: Windows 11, 25H2 Build 26200.8037 at 100% 2560x1440

Re: Delete+

Post 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.

eil
Posts: 1866
Joined: 13 Jan 2011 19:44

Re: Delete+

Post 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.
Win 7 SP1 x64 100% 1366x768|1900x1080

klownboy
Posts: 4459
Joined: 28 Feb 2012 19:27
Location: Windows 11, 25H2 Build 26200.8037 at 100% 2560x1440

Re: Delete+

Post 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.

eil
Posts: 1866
Joined: 13 Jan 2011 19:44

Re: Delete+

Post 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?";
Win 7 SP1 x64 100% 1366x768|1900x1080

klownboy
Posts: 4459
Joined: 28 Feb 2012 19:27
Location: Windows 11, 25H2 Build 26200.8037 at 100% 2560x1440

Re: Delete+

Post by klownboy »

Thanks for the modification eil.

Post Reply