Insert option for rename

Features wanted...
Post Reply
hari3
Posts: 225
Joined: 25 Sep 2016 13:57
Location: win 10,64 bit

Insert option for rename

Post by hari3 »

Because some files require inserting text at certain position.

x15.png
To see the attached files, you need to log into the forum.

highend
Posts: 14955
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Insert option for rename

Post 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...
One of my scripts helped you out? Please donate via Paypal

hari3
Posts: 225
Joined: 25 Sep 2016 13:57
Location: win 10,64 bit

Re: Insert option for rename

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

hari3
Posts: 225
Joined: 25 Sep 2016 13:57
Location: win 10,64 bit

Re: Insert option for rename

Post by hari3 »

So,will you add this to UI

Post Reply