Mutli-Rename Script v1.5c (Unicode)

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: Hacker, petermad, Stefan2, white

User avatar
nsp
Power Member
Power Member
Posts: 1917
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Post by *nsp »

majkinetor ! wrote:*** v1.1 ***

* ComboX, HLink modules updated. This will fix ComboX issue where plugin buttons were drawn over it.
***
Thx for the update, (you should have linked to the top message the current version (it is still pointing to 1.0 version.)

- Did you implemented the multi-step feature ? or will it be available for a MRS 2.0 beta ??

- Does MRS support %UL (unicode filelist) and unicode plugin ?
User avatar
majkinetor !
Power Member
Power Member
Posts: 1580
Joined: 2006-01-18, 07:56 UTC
Contact:

Post by *majkinetor ! »

I fixed the link, thx for notifying me.
- Did you implemented the multi-step feature ? or will it be available for a MRS 2.0 beta ??
Nope. Its planned for 2.0. However, see below.

- Does MRS support %UL (unicode filelist) and unicode plugin ?
Nope, however, there is currently Unicode version of AHK in development. Once it is over, script will silently be able to do Unicode file names. Creating Unicode version with non Unicode AHK is simply too much work without equal benefit.

This is also one of the reasons why I postponed v2.0.
I created draft for 2.0 and the plan was to separate Multi Rename Engine from GUI (MRE). You could be able then to create whatever interface you like - win, console, web, network, script driven etc... I was planning to introduce presets as little MRE scripts with .mrs extension that would look like:

sample.mrs

Code: Select all

Filter *.mp3
MaskN  [C:] [N2-30] [=Hash.CRC32]
CaseN Upper
ReplaceN "." " " 
MaskE [E].bak
UDF  param1 "param 2" "param n"
Replace _ " "
In above example each step can operate either on Name part, Extension part or entire part. For instance, ReplaceN will above will replace dot with space only in name (not in path or extension), while final Replace will take entire path and do so. Also, UDF is User Defined Function and it will be another type of plugin for MRE besides Mask plugins.

API is about to have 1 function only:

Code: Select all

FileListDst := Rename( FileListSrc, MrsScript-Or-FileListDst, Options ) 
where Options are stuff like collision prevention, dir making prevention, simulation etc... You will get destionation file list and you can do with it whatever you like, even undo with

Code: Select all

Rename(FileListDst, FileListSrc)
After this, MRE will ship with few GUIs so you can choose whatever you like or make your own.

You will agree that it is lots of work and I don't want to do it without Unicode in AHK as we will have half product. On the other hand, I never use Unicode file names so, I don't know.... maybe it will happen.

In any way, if you have any kind of suggestion, feel free to post it here or on AHK forum.
Habemus majkam!
User avatar
nsp
Power Member
Power Member
Posts: 1917
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Post by *nsp »

majkinetor ! wrote:I fixed the link, thx for notifying me.
- Did you implemented the multi-step feature ? or will it be available for a MRS 2.0 beta ??
Nope. Its planned for 2.0. However, see below.

...
API is about to have 1 function only:

Code: Select all

FileListDst := Rename( FileListSrc, MrsScript-Or-FileListDst, Options ) 
where Options are stuff like collision prevention, dir making prevention, simulation etc... You will get destionation file list and you can do with it whatever you like, even undo with

Code: Select all

Rename(FileListDst, FileListSrc)
After this, MRE will ship with few GUIs so you can choose whatever you like or make your own.

You will agree that it is lots of work and I don't want to do it without Unicode in AHK as we will have half product. On the other hand, I never use Unicode file names so, I don't know.... maybe it will happen.

In any way, if you have any kind of suggestion, feel free to post it here or on AHK forum.
I agree that it is a lot of work and the ability to build the renaming script in a reverible way (detect colision) is the major part.. Gui and file renaming are the easy part even if it is what people see...

UDF (do you mean same concept as UDF in autoitv3 ;))
User avatar
majkinetor !
Power Member
Power Member
Posts: 1580
Joined: 2006-01-18, 07:56 UTC
Contact:

Post by *majkinetor ! »

UDF (do you mean same concept as UDF in autoitv3 )
I don't know much about au3, so no :)
Its simply user defined AHK function with some known interface so you can quickly inject additional steps besides Mask, SR and Case.
Habemus majkam!
User avatar
majkinetor !
Power Member
Power Member
Posts: 1580
Joined: 2006-01-18, 07:56 UTC
Contact:

Post by *majkinetor ! »

v1.5a

+ Unicode support in GUI and AHK Plugins. Total Commander plugins are still not unicode (because they still mostly don't support it).
+ Resizable window (window placement is saved in ini)
+ Rename operation will create directory if it doesn't exist (__meta__)
+ If you hold CTRL while using drag&drop or shell extension to add single folder, MRS will add its files instead.
* Preset Save button and DropDown replaced with single editable ComboBox. To save preset write its desired name and press ENTER. To load preset select it from the list or type its name.
* You don't need AHK installed any more to run MRS.
Habemus majkam!
User avatar
fenix_productions
Power Member
Power Member
Posts: 1979
Joined: 2005-08-07, 13:23 UTC
Location: Poland
Contact:

Post by *fenix_productions »

2majkinetor !
Good news!

I can't test it at this moment (work) but I hope there will be no crashes in the case of ANSI TC plugins and strangely named files :)

P.S. Image link from first post does not work for me.
"When we created the poke, we thought it would be cool to have a feature without any specific purpose." Facebook...

#128099
User avatar
majkinetor !
Power Member
Power Member
Posts: 1580
Joined: 2006-01-18, 07:56 UTC
Contact:

Post by *majkinetor ! »

P.S. Image link from first post does not work for me.
Thx, I now see that its forbiden to access it and my corporative proxy made me not see it.
I can't test it at this moment (work) but I hope there will be no crashes in the case of ANSI TC plugins and strangely named files
I didn't update yet TcWdx.ahk module which is responsible for handling TC content plugins to support W functions. Its trivial thing, and with few hits I didn't see Unicode TC content plugins to test. I am more interested in making other parts of the MRS work correctly at this moment.

About the thing you mention, ANSI TC plugins with Unicode names, I didn't check if that but thx for the tip. Ill make sure when I fully support Unicode content plugins that such thing doesn't happen by informing the user that some file names can't be handled by plugins they choosed.
Habemus majkam!
User avatar
fenix_productions
Power Member
Power Member
Posts: 1979
Joined: 2005-08-07, 13:23 UTC
Location: Poland
Contact:

Post by *fenix_productions »

majkinetor ! wrote:Its trivial thing, and with few hits I didn't see Unicode TC content plugins to test. I am more interested in making other parts of the MRS work correctly at this moment.
Take a look on:
http://ghisler.ch/board/viewtopic.php?t=22700
"When we created the poke, we thought it would be cool to have a feature without any specific purpose." Facebook...

#128099
User avatar
Lefteous
Power Member
Power Member
Posts: 9537
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

The following of my plugins support Unicode:
- ShellDetails
- DirSizeCalc (not really useful for renaming)
- xPDFSearch (metadata fields)
User avatar
majkinetor !
Power Member
Power Member
Posts: 1580
Joined: 2006-01-18, 07:56 UTC
Contact:

Post by *majkinetor ! »

OK, thx. It will be in next version.
Habemus majkam!
User avatar
majkinetor !
Power Member
Power Member
Posts: 1580
Joined: 2006-01-18, 07:56 UTC
Contact:

Post by *majkinetor ! »

DirSizeCalc (not really useful for renaming)
You could use MRS to generate file/directory reports (using editor preview). Execution can be automated via command line.
[N] | [=DirSizeCalc.File Count (on demand)] files | [=ShellDetails.Owner] | [1-] | [=ShellDetails.Date Created]:

docs | 5 files | Administrators | D:\MRS\docs | 2010.2.8 19.7.24
inc | 19 files | Administrators | D:\MRS\inc | 2010.2.8 19.7.24
plugins | 36 files | Administrators | D:\MRS\plugins | 2010.2.8 19.7.24
res | 4 files | Administrators | D:\MRS\res | 2010.2.8 19.7.24
Habemus majkam!
User avatar
majkinetor !
Power Member
Power Member
Posts: 1580
Joined: 2006-01-18, 07:56 UTC
Contact:

Post by *majkinetor ! »

Help is updated with information about integration in Total Commander, reports usage and program info.
Habemus majkam!
User avatar
majkinetor !
Power Member
Power Member
Posts: 1580
Joined: 2006-01-18, 07:56 UTC
Contact:

Post by *majkinetor ! »

v1.5b

+ TCWdx module improved:
  • + Unicode support for TC content plugins - module will first try W export, then A export, then it will return error.
    + It cashes function adresses for faster subsequent calls. HTML manual for external use.
    * Removed dependency on folder names to be equal to content plugins names. When TC ini file is not present, module now searches recursively for all wdx files in the \plugins folder.
* Range will no longer flicker in "select range" inputbox. Inputbox is wider.
+ Added TC content plugin cputil.wdx which allows to find file names with characters from a different code page, and rename them using conversion table.
+ ShellDetails.wdx updated to Unicode version.
Habemus majkam!
User avatar
majkinetor !
Power Member
Power Member
Posts: 1580
Joined: 2006-01-18, 07:56 UTC
Contact:

Post by *majkinetor ! »

I remember some people asked for [C] that resets in different folders.
Here is quick plugin that can be used to do so:

plugins\DirCnt.ahk

Code: Select all

/*
 Author:        majkinetor
 Version:       1.0
 Description:   Calculates file number in the directory. Can not show real time preview.
 Usage:         DirCnt.N
                N - Number of decimal places.
 */
DirCnt: 
    #Res := DirCnt(#3)
return

DirCnt_GetFields:
    #Res = *
return


DirCnt(No) {
    global
    static c
    
    if (#flag = "prev")     ;Disable real time preview. There is no way to know file number before iterating preceding list.
       return "###"

    if (#no = 1)
        c := Object()
    
    if !IsObject(c[#fd])
         c[#fd] := Object("cnt", 1)
    else c[#fd].cnt := c[#fd].cnt + 1

    res := c[#fd].cnt
    if (x := No-StrLen(c[#fd].cnt)) > 0
        res := SubStr("0000000000000000", 1, x) res

    return res
}
Habemus majkam!
User avatar
majkinetor !
Power Member
Power Member
Posts: 1580
Joined: 2006-01-18, 07:56 UTC
Contact:

Post by *majkinetor ! »

v1.5c
  • ! Fixed issue with content plugins that have - in the name (i.e. jpg-comment.wdx)
    + Optimization: Improved speed of editor preview a lot.
Habemus majkam!
Post Reply