Import list of filenames in MultiRenameTool

English support forum

Moderators: white, Hacker, petermad, Stefan2

User avatar
Hacker
Moderator
Moderator
Posts: 13067
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

Christian,
TC would have to use a specific list format
Actually, no, it wouldn't. Simply adding two more regex fields, "Original name" and "New name" would allow to specify the format.

For instance the list might look like:

Code: Select all

blablubb.txt -> secret letter to Mr. Smith.txt
random numbers.xls -> secret company accounting.xls
And the fields specifying the original and the new name would be (filled in by the user):
Original name:

Code: Select all

(.*) ->.*
New name:

Code: Select all

.* -> (.*)
This would result in two variables, eg. [OrigName] and [NewName].
so can anyone explain what would be the advantage of doing this in TC?
You could do everything you can't with a batch:
- undo
- see if there are errors in the results
- add a counter ([NewName] [C:2]), etc.
- sort by size
- maybe even content plugins would be usable, if you somehow passed [OrigName] to them

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
berhan
Junior Member
Junior Member
Posts: 8
Joined: 2006-01-26, 14:50 UTC
Location: Serbia

Post by *berhan »

about putting "ren" in my file:

that was my first idea before I came to this forum, and there is no problem to do that, but ... this is not just for me, I will learn Batch, it will be of use for me, but...

Total Commander is a FILE MANAGMET software (in my opinion the GRATEST), isn't it???

Is this a file managment task??? I think so.

And there are many people who will use this feature.

Didn't meen to be rude.



:)
Last edited by berhan on 2006-02-04, 11:43 UTC, edited 1 time in total.
User avatar
majkinetor !
Power Member
Power Member
Posts: 1580
Joined: 2006-01-18, 07:56 UTC
Contact:

Post by *majkinetor ! »

You could do everything you can't with a batch:
???
Ghisler wrote:When you write a batch file which creates such a list from the database, why not create directly a file like this: ren image1004.gif something.gif
I was creating it in the example above !?

The main reason for this upgrade is simplicity. Everything can be done in batch but you sometimes don't have an option to export things the way you want to. For instance imagine administraotr sending CSV files to its user, or some 3th party tool witch doesn't allow ordering and skiping of fileds.

You need to have an option to set [delimiter] to set [new line] and everything else is strait forward like in AWK - you create some metachar like $2 for second field to be able to do this:

Code: Select all

[N] -> $2
or imagine this
maybe even content plugins would be usable, if you somehow passed [OrigName] to them

Code: Select all

[N] ->$2 [=images.Width] x [=images.Height]

The only problem with this method is that order of files in database doesn't need to be the same as in the list so above code should refer to situation in witch data is searched for the selection (must be 1-1) and from found record second field is taken to assist in new name composition.

Or if file names are not given in database, the database should be iterated in usual sequential manner. (this is an option that needs to be set at the start), like this radio button group:
  • o File names are given in ___ (for instance 4)
    o Iterate through database sequentialy
Habemus majkam!
burekbrigada
Junior Member
Junior Member
Posts: 13
Joined: 2003-11-13, 23:51 UTC
Location: Serbia

Post by *burekbrigada »

ghisler(Author) wrote:I still don't see the advantage of such a feature when you already have the pairs of old and new names in a text file!

When you write a batch file which creates such a list from the database, why not create directly a file like this:
ren image1004.gif something.gif
so can anyone explain what would be the advantage of doing this in TC?
Because you want to keep your descript.ion, if you using batch files or external programs you will lost file descriptions.
User avatar
StickyNomad
Power Member
Power Member
Posts: 1933
Joined: 2004-01-10, 00:15 UTC
Location: Germany

Post by *StickyNomad »

2ghisler(Author)
so can anyone explain what would be the advantage of doing this in TC?
I like the behaviour implemented in the rename toolLupasRename:

You select your desired files, open the integrated texteditor and open the textfile or paste the desired text. This text contains the target file names only. I like this and use it quite often so I would like to see in TC at least this option and this should be quite easy to implement.

When using a list file containing the names of source and target files, I think a batch is a good way, especially because the list already exists and can easily complemented to a batch file.
User avatar
SanskritFritz
Power Member
Power Member
Posts: 3693
Joined: 2003-07-24, 09:25 UTC
Location: Budapest, Hungary

Post by *SanskritFritz »

Thats right, the idea was already presented in the german forum, translated:

A button in the MRT, which would write a textfile with all the filenames to the temp folder, and calls the default editor with the file. I can edit the file the way i want, and after i saved, TC would check the number of lines in the file, if it has the same amount of lines as the amount of files are listed in the MRT, TC would do the rename based on the file.

Guys, just imagine the fun and the power: renaming files with TextPad's (or any other editor's) capabilities!
I switched to Linux, bye and thanks for all the fish!
User avatar
StickyNomad
Power Member
Power Member
Posts: 1933
Joined: 2004-01-10, 00:15 UTC
Location: Germany

Post by *StickyNomad »

2SanskritFritz

Yes, that would be great!
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Yes, sounds indeed like a good idea! I will check if it can be done.
Author of Total Commander
https://www.ghisler.com
User avatar
SanskritFritz
Power Member
Power Member
Posts: 3693
Joined: 2003-07-24, 09:25 UTC
Location: Budapest, Hungary

Post by *SanskritFritz »

Promised?
:twisted:
I switched to Linux, bye and thanks for all the fish!
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I have put it on my to do (or to try) list for TC 7, so I will certainly try to add it. It's just a bit difficult to find some free space in the dialog for the button...
Author of Total Commander
https://www.ghisler.com
User avatar
SanskritFritz
Power Member
Power Member
Posts: 3693
Joined: 2003-07-24, 09:25 UTC
Location: Budapest, Hungary

Post by *SanskritFritz »

:lol: if that is all your problem with the task ...
I switched to Linux, bye and thanks for all the fish!
User avatar
StickyNomad
Power Member
Power Member
Posts: 1933
Joined: 2004-01-10, 00:15 UTC
Location: Germany

Post by *StickyNomad »

Hm, if the MRT window still should fit 640 pix screen width, there is indeed not much space left for an additional button...

If needed, I could try to figure out some layout variants to insert that new button. Simply adding a new line with that single button would look a bit strange IMHO.
User avatar
Lefteous
Power Member
Power Member
Posts: 9535
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

Date and time values can be accomplished by using the regular placeholder [YMD] and [hms] or by using the content plugin placeholders. Please think about removing the [YMD] and [hms] buttons.

As Stickynomad wrote some layout changes would be nice. Especially rename masks containing content plugin placeholders are much longer than with regular placeholders and don't fit into the edit field.
User avatar
StickyNomad
Power Member
Power Member
Posts: 1933
Joined: 2004-01-10, 00:15 UTC
Location: Germany

Post by *StickyNomad »

2Lefteous
rename masks containing content plugin placeholders are much longer than with regular placeholders and don't fit into the edit field.
Right. I'll play around a bit as soon as I find some time and will consider your remark.

I'm not sure if I'd completely remove the [YMD] and [hms] buttons as many unexperienced users could overlook this useful and -by quite a bunch of users- oftenly used feature. Maybe these buttons could be merged into a single Timestamp button with [YMD hms] inserted by default.
User avatar
SanskritFritz
Power Member
Power Member
Posts: 3693
Joined: 2003-07-24, 09:25 UTC
Location: Budapest, Hungary

Post by *SanskritFritz »

Or the buttons could fire submenus like the Options button in the copy dialog.
I switched to Linux, bye and thanks for all the fish!
Post Reply