Scripting Nuke

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
Jeff Bellune
Posts: 284
Joined: 13 Dec 2007 12:55

Scripting Nuke

Post by Jeff Bellune »

I use Nuke to delete files from my temp folders that otherwise couldn't be deleted using a simple delete command. Additionally, Nuke doesn't trigger a dialog telling me that such-and-such a file cannot be deleted because it is in use. It simply deletes what it can and skips the rest. Quick and neat. And of course, it does not ask for delete confirmation.

AFAIK, the various scriptable delete commands cannot duplicate Nuke's function. I get incomplete deletes and/or multiple dialogs.

Is there a way to duplicate Nuke's function using scripting?

If not, there should be!

-Jeff

admin
Site Admin
Posts: 66074
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Scripting Nuke

Post by admin »

Hi Jeff, I'll add Nuke to Miscellaneous, then you have an #ID to use in scripting.

Jeff Bellune
Posts: 284
Joined: 13 Dec 2007 12:55

Post by Jeff Bellune »

Thanks, Don!

wraithdu
Posts: 27
Joined: 17 Apr 2008 07:51

Post by wraithdu »

Somewhat related to this, is there a way (can there be a way) to alter the default Delete (and big X button) behavior to NOT use the recycle bin? Then Shift-Del would USE the recycle bin.

I prefer to just delete files, but I feel safter not using Nuke in case of an errant click.

serendipity
Posts: 3360
Joined: 07 May 2007 18:14
Location: NJ/NY

Post by serendipity »

wraithdu wrote:Somewhat related to this, is there a way (can there be a way) to alter the default Delete (and big X button) behavior to NOT use the recycle bin? Then Shift-Del would USE the recycle bin.

I prefer to just delete files, but I feel safter not using Nuke in case of an errant click.
Maybe I got you wrong, but altering default delete to NOT use recycle bin is similar to nuke button. Errant click would also matter in this case.

admin
Site Admin
Posts: 66074
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Post by admin »

wraithdu wrote:Somewhat related to this, is there a way (can there be a way) to alter the default Delete (and big X button) behavior to NOT use the recycle bin? Then Shift-Del would USE the recycle bin.

I prefer to just delete files, but I feel safter not using Nuke in case of an errant click.
No, this is currently not possible and I would not like to change this. Swapping the logic if Shift in this context feels like looking for trouble... it's tempting but I will resist. :wink:

wraithdu
Posts: 27
Joined: 17 Apr 2008 07:51

Post by wraithdu »

@serendipity
Not really, since in this case you are still prompted if you want to delete or not, giving you a chance to cancel.

@admin
Fair enough. If you should change your mind though....I'll be waiting :)

admin
Site Admin
Posts: 66074
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Post by admin »

Jeff Bellune wrote:Thanks, Don!
I just saw that Nuke actually calls Delete (Skip Locked) (with no dialogs and no recycle bin). And with the current implementation you do get a message when no file is selected, or when all selected files are locked and nothing is deleted.

Also, in future Nuke will be changed to erase files beyond restore.

I guess this is not exactly what you want in scripting? You rather want a simple delete without questions or messages, right? What about previewed files. Auto-Stop preview before attempting to delete?

serendipity
Posts: 3360
Joined: 07 May 2007 18:14
Location: NJ/NY

Post by serendipity »

wraithdu wrote:@serendipity
Not really, since in this case you are still prompted if you want to delete or not, giving you a chance to cancel.
oh sorry i had turned off my delete confirmation.

Jeff Bellune
Posts: 284
Joined: 13 Dec 2007 12:55

Post by Jeff Bellune »

admin wrote:I just saw that Nuke actually calls Delete (Skip Locked) (with no dialogs and no recycle bin). And with the current implementation you do get a message when no file is selected, or when all selected files are locked and nothing is deleted.

Also, in future Nuke will be changed to erase files beyond restore.

I guess this is not exactly what you want in scripting? You rather want a simple delete without questions or messages, right? What about previewed files. Auto-Stop preview before attempting to delete?
You're right - Nuke gives me a message if all files are locked. I don't usually run into that case because I know which 2 or 3 files are always locked in my temp folders, and I don't try to delete them if they are the only ones there.

Typically my workflow is to go to a temp folder, select all the files with Ctrl+A, click the Nuke button on the toolbar, and then go back to work. Locked files don't get deleted and no confirmation or warning dialogs appear.

The auto-stop feature sounds interesting, but for me, this is a case of "less is more". Simply allowing Nuke to be scripted would be sufficient. No need making this more complex than necessary. YMMV.

Thanks,
-Jeff

admin
Site Admin
Posts: 66074
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Post by admin »

Jeff Bellune wrote:
admin wrote:I just saw that Nuke actually calls Delete (Skip Locked) (with no dialogs and no recycle bin). And with the current implementation you do get a message when no file is selected, or when all selected files are locked and nothing is deleted.

Also, in future Nuke will be changed to erase files beyond restore.

I guess this is not exactly what you want in scripting? You rather want a simple delete without questions or messages, right? What about previewed files. Auto-Stop preview before attempting to delete?
You're right - Nuke gives me a message if all files are locked. I don't usually run into that case because I know which 2 or 3 files are always locked in my temp folders, and I don't try to delete them if they are the only ones there.

Typically my workflow is to go to a temp folder, select all the files with Ctrl+A, click the Nuke button on the toolbar, and then go back to work. Locked files don't get deleted and no confirmation or warning dialogs appear.

The auto-stop feature sounds interesting, but for me, this is a case of "less is more". Simply allowing Nuke to be scripted would be sufficient. No need making this more complex than necessary. YMMV.

Thanks,
-Jeff
Ok, makes sense. Nuke should have a second trigger anway; right now it's only on the toolbar... (auto-stop preview is built into nuke anyway).

Jeff Bellune
Posts: 284
Joined: 13 Dec 2007 12:55

Post by Jeff Bellune »

Build 77 works great, Don. Thanks again! :)

-Jeff

wraithdu
Posts: 27
Joined: 17 Apr 2008 07:51

Post by wraithdu »

Well I thought I could do what I had requested above by modifying the keybaord shortcuts...but it doesn't quite work.

Basically I changed the Delete (No Recycle Bin) keyboard shortcut #170 to "Del" and the Delete shortcut #169 to "Shift+Del". It half-way works in that pressing "Del" will delete without using the Recy Bin, but pressing "Shift+Del" does the same thing. The toolbar button acts the same as before, click = delete with recy, shift+click = delete without recy.

Is this a bug or did I break the system? ;)

admin
Site Admin
Posts: 66074
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Post by admin »

wraithdu wrote:Well I thought I could do what I had requested above by modifying the keybaord shortcuts...but it doesn't quite work.

Basically I changed the Delete (No Recycle Bin) keyboard shortcut #170 to "Del" and the Delete shortcut #169 to "Shift+Del". It half-way works in that pressing "Del" will delete without using the Recy Bin, but pressing "Shift+Del" does the same thing. The toolbar button acts the same as before, click = delete with recy, shift+click = delete without recy.

Is this a bug or did I break the system? ;)
Okay, I knew it would happen one day. :wink: Yes, you found a system break point here. Because I hardcoded: When Shift is down, the Recycle Bin is bypassed. Why? To meet standard Windows expectations. And because I vainly hoped nobody would be so crazy to reverse the functionality of Shift here. :wink:

wraithdu
Posts: 27
Joined: 17 Apr 2008 07:51

Post by wraithdu »

LOL, I like being different. I'm halfway there, so I'm happy :)

Post Reply