FTwo Default Behavior

Features wanted...
Post Reply
Servinjesus1
Posts: 5
Joined: 21 Jul 2020 21:33

FTwo Default Behavior

Post by Servinjesus1 »

I'd like to make F2 (FTwo because two-letter words are "too common" to search for in the forum...) by default use Regex Rename rather than Batch Rename when multiple files are selected. Would such an option (as maybe a drop-down to select between Rename Special options?) be possible?

Batch Rename is unfortunately a little limited since you can't replace characters within names - only entirely replace the names or reuse the existing names as they are.

highend
Posts: 13274
Joined: 06 Feb 2011 00:33

Re: FTwo Default Behavior

Post by highend »

Menu - Tools - Customize Keyboard Shortcuts...

File, Rename Special, RegExp Rename...

Assign it to F2?

Or is it really related to how many items are selected?

If yes, use a user defined command that executes a script and assign that to F2

Code: Select all

    // #121 -> Batch Rename...
    // #122 -> RegExp Rename...

    $cntSel = gettoken(<get SelectedItemsPathNames |>, "count", "|");
    end (!$cntSel), "No item(s) selected, aborted!";

    if ($cntSel > 1) { #122; }
    else { #121; }
One of my scripts helped you out? Please donate via Paypal

Servinjesus1
Posts: 5
Joined: 21 Jul 2020 21:33

Re: FTwo Default Behavior

Post by Servinjesus1 »

Thanks, inspired by your code, I went with this script:

Code: Select all

"RegExp Rename F2 : regex F2"
	// #172 -> Rename
	// #122 -> RegExp Rename...

	$cntSel = gettoken(<get SelectedItemsPathNames |>, "count", "|");

	if ($cntSel > 1) { #122; }
	else { #172; }

Post Reply