Page 1 of 1

FTwo Default Behavior

Posted: 01 Jun 2021 17:12
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.

Re: FTwo Default Behavior

Posted: 01 Jun 2021 17:18
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; }

Re: FTwo Default Behavior

Posted: 16 Jun 2021 19:28
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; }