Page 1 of 1

Insert option for rename

Posted: 06 Nov 2018 12:15
by hari3
Because some files require inserting text at certain position.

x15.png

Re: Insert option for rename

Posted: 06 Nov 2018 13:36
by highend
Use a script

Code: Select all

    $notes = <<<>>>
Usage: <position>|<text>
If "<position>|" is left out, <text> is appended (before any extension)
<position> = 0: Insert at the beginning
Any other number than 0: Insert at that position
>>>;
    $default = "0|";
    $text = input("Insert text", $notes, $default, "s", , 250, 150);
    if (regexmatches($text, "^\d+\|")) {
        $position = gettoken($text, 1, "|");
        $text = gettoken($text, 2, "|");
    } else {
        if (exists(<curitem>) == 2) { $position = strlen(<curname>); }
        else { $position = strlen(<curbase>); }
    }
    renameitem(substr(<curname>, 0, $position) . $text . substr(<curname>, $position));
No, I'm to lazy to wrap this into dialog windows via html...

Re: Insert option for rename

Posted: 08 Nov 2018 14:57
by hari3
Don -- I don't want to get this done through scripting because i can't freely adjust the options and sometimes it's buggy.

Re: Insert option for rename

Posted: 11 Nov 2018 10:14
by hari3
So,will you add this to UI