FRename3

Here you can discuss about your favorite plug-in.
pepak
Posts: 604
Joined: Sun 13 Jul, 2008 11:18
Has thanked: 17 times
Been thanked: 54 times

FRename3

Post by pepak »

I took the liberty of rewriting the old plugin FRename by Jouri Mamaev to a more modern format. I tried to mimic the behavior of the original plugin for the most part, but it is a complete rewrite, no source code from the original was used. The plugin is now written in Delphi and supports both FAR 2 and 3, both 32bit and 64bit. The UI changes are mostly cosmetic, e.g. I opted for a different filename marker (I used quotes) and provided some new functionality to the editor window: the plugin now has a menu which lets you to:
  • move the cursor quickly to the beginning of the destination filename, which is very useful if you are renaming long filenames with plenty of word separators), and
  • select all destination filenames in a vertical block, which lets you apply various block-level plugins (e.g. Change Case or RESearch) to them.
These functions are also accessible through keyboard shortcuts - ALT+F1 to jump to the beginning of the filename and ALT+F2 to mark the block.

Announcement and links
Last edited by pepak on Sun 17 Oct, 2021 10:41, edited 2 times in total.
User avatar
HaRT
Moderator
Posts: 10806
Joined: Tue 30 Aug, 2005 17:21
Has thanked: 220 times
Been thanked: 357 times

FRename

Post by HaRT »

Using the name of the original plugin will likely cause users' confusion.
Maybe you change the name at least a little?
Фар есть инструмент, а не нянька. © 2009 DrKnS
User avatar
bigvax
Posts: 28
Joined: Fri 02 Jun, 2006 17:18
Location: где-то во времени
Has thanked: 3 times
Been thanked: 1 time
Contact:

FRename3

Post by bigvax »

I made a Russian translation .lng file for the plugin.
I give it to you.
FRename3Rus.lng.7z
(891 Bytes) Downloaded 421 times
Всегда виртуально Ваш, BigVax
pepak
Posts: 604
Joined: Sun 13 Jul, 2008 11:18
Has thanked: 17 times
Been thanked: 54 times

FRename3

Post by pepak »

Thanks, I will add it to the plugin.
pp
Posts: 36
Joined: Wed 24 Jan, 2007 11:39
Location: Česká republika
Has thanked: 7 times
Contact:

FRename3

Post by pp »

Great! Thanks, I really missed this plugin in FAR3.
User avatar
HaRT
Moderator
Posts: 10806
Joined: Tue 30 Aug, 2005 17:21
Has thanked: 220 times
Been thanked: 357 times

FRename3

Post by HaRT »

pepak, thank you for a great plugin. It just works. :)
I have a feature request: it would be nice to preserve files selection after renaming, that is, to re-select each file after it is renamed. It will be handy when renaming is just one of a series of operations to perform on the group of files. After all, to unselect them is just one shortcut.
Ideally, if any of the files being renamed was the current one on the panel, it should remain current under the new name.
Since the plugin has no dedicated UI (apart from the editor), what I ask might be a global setting or even a string in the LNG file (as it can be customized).
Фар есть инструмент, а не нянька. © 2009 DrKnS
pepak
Posts: 604
Joined: Sun 13 Jul, 2008 11:18
Has thanked: 17 times
Been thanked: 54 times

FRename3

Post by pepak »

Not sure about this - the current selection strategy is also reasonable (select non-renamed files so that you can attempt to rename them again). I will have to think about how to provide a user with choice.
User avatar
HaRT
Moderator
Posts: 10806
Joined: Tue 30 Aug, 2005 17:21
Has thanked: 220 times
Been thanked: 357 times

FRename3

Post by HaRT »

pepak wrote: select non-renamed files so that you can attempt to rename them again
This is perfectly valid if the plugin failed to rename some files but pretty useless when all files succeeded. If a user could switch between selecting failed and succeeded files (e.g. by standard CtrlM), it would be great. I suppose it is not too hard to select succeeded files programmatically, then replace selection by failed files, and FAR will provide switching. :)
Фар есть инструмент, а не нянька. © 2009 DrKnS
User avatar
HaRT
Moderator
Posts: 10806
Joined: Tue 30 Aug, 2005 17:21
Has thanked: 220 times
Been thanked: 357 times

FRename3

Post by HaRT »

pepak, and what do you think of this:
HaRT wrote: Ideally, if any of the files being renamed was the current one on the panel, it should remain current under the new name.
Фар есть инструмент, а не нянька. © 2009 DrKnS
pepak
Posts: 604
Joined: Sun 13 Jul, 2008 11:18
Has thanked: 17 times
Been thanked: 54 times

FRename3

Post by pepak »

As I said, I need to figure out some reasonable way of letting the user choose. Your CTRL+M trick would be perfect, except I don't think I can do that in FAR (I don't think there's a call which would intruct FAR to "remember the selection now").
User avatar
HaRT
Moderator
Posts: 10806
Joined: Tue 30 Aug, 2005 17:21
Has thanked: 220 times
Been thanked: 357 times

FRename3

Post by HaRT »

pepak wrote: I don't think I can do that in FAR (I don't think there's a call which would intruct FAR to "remember the selection now")
Doesn't the FCTL_BEGINSELECTION,FCTL_ENDSELECTION pair applied twice do the trick?
Фар есть инструмент, а не нянька. © 2009 DrKnS
pepak
Posts: 604
Joined: Sun 13 Jul, 2008 11:18
Has thanked: 17 times
Been thanked: 54 times

FRename3

Post by pepak »

Maybe it does. I will check.
vodek
Posts: 31
Joined: Sat 12 May, 2012 09:29
Has thanked: 4 times

FRename3

Post by vodek »

Starting with the FAR version over 3.0 build 5327.
FRename3 is working with an error ...

╔════════════ FRename3 ════════════╗ ║ Failed to locate the editor's ID ║ ╟──────────────────────────────────╢ ║ { OK } ║ ╚══════════════════════════════════╝ ╔═══════════════════════════════════ Exception occurred ═══════════════════════════════════╗ ║ Exception: 0xC0000005 - EXCEPTION_ACCESS_VIOLATION ║ ║ Details: Memory at 0000000000000003 could not be read ║ ║ LastError: ║ ║ NTSTATUS: ║ ║ Address: 0x7FFFF9DA5C21 - ntdll.dll!RtlDosPathNameToRelativeNtPathName_U_WithStatus ║ ║ Source: ║ ║ Function: OpenW ║ ║ Module: C:\Program Files\FAR manager\Plugins\FRename3\FRename3.far3.x64.dll ║ ╟──────────────────────────────────────────────────────────────────────────────────────────╢ ║ { Unload plugin } [ Stack ] [ Minidump ] [ Ignore ] ║ ╚══════════════════════════════════════════════════════════════════════════════════════════╝
pepak
Posts: 604
Joined: Sun 13 Jul, 2008 11:18
Has thanked: 17 times
Been thanked: 54 times

FRename3

Post by pepak »

Seems to work fine with build 5333, both x86 and x64 (just the official archive unpacked, clean profile, FRename3).
vodek
Posts: 31
Joined: Sat 12 May, 2012 09:29
Has thanked: 4 times

FRename3

Post by vodek »

Unfortunately with build 5333 the same...
Post Reply

Return to “General Plug-In Discussions”