Import list of filenames in MultiRenameTool
Moderators: Hacker, petermad, Stefan2, white
Import list of filenames in MultiRenameTool
I have thousands of files:
For example:
image1001.gif
image1002.jpg
image705.gif
....
And I have database like this:
Image_Name, Image_Filename
Alexander, image204.gif
Sonya, image3.jpg
River Danube, image9004.bmp
I want to have filenames like this:
Alexander.gif
Sonya.jpg
River Danube.bmp
my question is:
how can I import txt or any other file, witch will contain new filenames into MRT???????
For example:
image1001.gif
image1002.jpg
image705.gif
....
And I have database like this:
Image_Name, Image_Filename
Alexander, image204.gif
Sonya, image3.jpg
River Danube, image9004.bmp
I want to have filenames like this:
Alexander.gif
Sonya.jpg
River Danube.bmp
my question is:
how can I import txt or any other file, witch will contain new filenames into MRT???????
- majkinetor !
- Power Member
- Posts: 1580
- Joined: 2006-01-18, 07:56 UTC
- Contact:
Why don't you talk on Serbian so anybody can understand you (2 alldomestic joke, don't replay)
I understand what you are trying to do, but you gave us too litle info.
Main questio: In what form is databse. TXT file ?
FIRST SOLUTION: This can be done externaly much better. Batch script .
I understand what you are trying to do, but you gave us too litle info.
Main questio: In what form is databse. TXT file ?
FIRST SOLUTION: This can be done externaly much better. Batch script .
Habemus majkam!
- StickyNomad
- Power Member
- Posts: 1933
- Joined: 2004-01-10, 00:15 UTC
- Location: Germany
Welcome!
AFAIK TC can't do this out of the box, but you could try an external rename tool like the free tool Lupasrename. This one's capable of renaming files based on a textfile.
I think JOE File renamer can also do this, but I'm not sure. Some people here use this tool, I prefer Lupas...
AFAIK TC can't do this out of the box, but you could try an external rename tool like the free tool Lupasrename. This one's capable of renaming files based on a textfile.
I think JOE File renamer can also do this, but I'm not sure. Some people here use this tool, I prefer Lupas...
- majkinetor !
- Power Member
- Posts: 1580
- Joined: 2006-01-18, 07:56 UTC
- Contact:
- StickyNomad
- Power Member
- Posts: 1933
- Joined: 2004-01-10, 00:15 UTC
- Location: Germany
- majkinetor !
- Power Member
- Posts: 1580
- Joined: 2006-01-18, 07:56 UTC
- Contact:
Note to author
Note to Mr. Ghisler
Please consider this as an idea for TC.
if you make it possibile to do it with TC there won't be need to use anything external.
thanx.
Please consider this as an idea for TC.
if you make it possibile to do it with TC there won't be need to use anything external.
thanx.
- majkinetor !
- Power Member
- Posts: 1580
- Joined: 2006-01-18, 07:56 UTC
- Contact:
I agree with icfu. This is so stupid I can't beleive it is happening !
-----
I just wanted to post here some info about requested.
It turned out that database is in the format:
Database.txt
And the man wanted to select images and rename them acording to 3-th field.
This can be done using batch or much better Awk or Perl:
This is the key statement for the batch file: This will return 3th filed alone.
Baner
Protest
Foto dana
Now.. with file selected in TC you do this:
to export the line which contain desired name for selected file:
For instance:
will give on the exit
Now:
will do the trick for 1 file.
This can be easily upgraded to handle list of files selected.
-----
I just wanted to post here some info about requested.
It turned out that database is in the format:
Database.txt
Code: Select all
"1";"1";"Baner";;"image1.gif";"0";"0";"0"
"2";"2";"Protest";;"image2.gif";"0";"0";"0"
"4";"2";"Foto dana";;"image4.gif";"0";"0";"0"
....
This can be done using batch or much better Awk or Perl:
This is the key statement for the batch file:
Code: Select all
for /F "delims=; tokens=3" %i in ('type database.txt') do @echo %~i
Baner
Protest
Foto dana
Now.. with file selected in TC you do this:
Code: Select all
find "%1" database.txt >temp.txt
For instance:
Code: Select all
find "image1.gif" database.txt
Code: Select all
"1";"1";"Baner";;"image1.gif";"0";"0";"0"
Code: Select all
for /F "delims=; tokens=3" %i in ('type temp.txt') do @set NAME=%~i
set NEWNAME_WITHEXT=%NAME%%x1
ren %1 %NEWNAME_WITHEXT%
This can be easily upgraded to handle list of files selected.
Habemus majkam!
again to the author
Again to the author:
You see?????
for me this solution is very complicated
it's not the point to just do what man told me to.
I will now have to learn complete batch language becouse I want to understand this, and not to "JUST DO IT"
Dear Christian, please try to make it posible in MRT to rename files based on a textfle, it does not have to be pure database format, like CSV or somethind else, it is easy to manipulate text files and prepare it for renaming.
For example:
file can contain just rows with source filenames and target filenames
image1004.gif > something.gif
image5.jpg > any.jpg
...
or
image1004.gif;something.gif
image5.jpg;any.jpg
Thanx
PS
Thank you very much, majkinetor !
You see?????
for me this solution is very complicated
it's not the point to just do what man told me to.
I will now have to learn complete batch language becouse I want to understand this, and not to "JUST DO IT"

Dear Christian, please try to make it posible in MRT to rename files based on a textfle, it does not have to be pure database format, like CSV or somethind else, it is easy to manipulate text files and prepare it for renaming.
For example:
file can contain just rows with source filenames and target filenames
image1004.gif > something.gif
image5.jpg > any.jpg
...
or
image1004.gif;something.gif
image5.jpg;any.jpg
Thanx
PS
Thank you very much, majkinetor !
- majkinetor !
- Power Member
- Posts: 1580
- Joined: 2006-01-18, 07:56 UTC
- Contact:
I support this idea
------
2 berhan
You are working as administrator IIRC. This is not complicated and you should use batch script often during your job. You can't expect somebody else do your work. We can only give you notes on how that can be done, which is, if you ask me, more then enough... during my studies I didn't have that pleasure.
So, if you are waiting for Ghisler to do something about this, you are betting on the wrong horse! You can ask for it, of course, but if you stick to this forum for several moths you will understand my words. The chance for implementation of this request is, IMO, less then 1%.
It is much better and easier to learn batch, do this, and use that knowledge for all eternity then to wait for somebody to do it, especialy Ghisler.
---
Also if I may notice situation you mentioned above:
You will have to repeat formating procedure for every future request, and all files must be in the same folder, while in first case, you do it once, and only select files you want to rename and press a button (you can arrange files into subfolders also without a problem since you have CTRL + B feature)
best wishes
m.
------
2 berhan
You are working as administrator IIRC. This is not complicated and you should use batch script often during your job. You can't expect somebody else do your work. We can only give you notes on how that can be done, which is, if you ask me, more then enough... during my studies I didn't have that pleasure.
So, if you are waiting for Ghisler to do something about this, you are betting on the wrong horse! You can ask for it, of course, but if you stick to this forum for several moths you will understand my words. The chance for implementation of this request is, IMO, less then 1%.
It is much better and easier to learn batch, do this, and use that knowledge for all eternity then to wait for somebody to do it, especialy Ghisler.
---
Also if I may notice situation you mentioned above:
can be easily converted to batch script via good text editor (I use Edit Plus) with few formating routines:image1004.gif > something.gif
image5.jpg > any.jpg
- - first prepend ren to every line
- delete > (replace with nothing)
- save as batch and run
image1004.gif;something.gif
image5.jpg;any.jpg
- - replace ; with space
- prepend ren
- save to batch and run
You will have to repeat formating procedure for every future request, and all files must be in the same folder, while in first case, you do it once, and only select files you want to rename and press a button (you can arrange files into subfolders also without a problem since you have CTRL + B feature)
best wishes
m.
Last edited by majkinetor ! on 2006-01-28, 16:38 UTC, edited 3 times in total.
Habemus majkam!
2majkinetor !
Well there has been a discussion about the topic in the German forum. Ghisler showed interest in the feature.So, if you are waiting for Ghisler to do something about this, you are betting on the wrong horse! You can ask for it, of course, but if you stick to this forum for several moths you will understand my words. The chance for implementation of this request is, IMO, less then 1%.
- majkinetor !
- Power Member
- Posts: 1580
- Joined: 2006-01-18, 07:56 UTC
- Contact:
heh.... isn't that cool or what... we are having 3 forums... and just few people who reads them all... what a waste of knowledge .
2 God
You really spoiled everything with that Babylon Tower, you know!
EDIT: Leftious, I am curious, what is your real opinion about this. You are my guru, right! I must ask you.
2 God
You really spoiled everything with that Babylon Tower, you know!
EDIT: Leftious, I am curious, what is your real opinion about this. You are my guru, right! I must ask you.
Habemus majkam!
- majkinetor !
- Power Member
- Posts: 1580
- Joined: 2006-01-18, 07:56 UTC
- Contact:
- ghisler(Author)
- Site Admin
- Posts: 50824
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
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
?
This would then work as a batch file without the need of any external programs like Total Commander! so can anyone explain what would be the advantage of doing this in TC? TC would have to use a specific list format, so a conversion to that format would still be needed - and when you do this, you could as well create a batch file directly...
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
?
This would then work as a batch file without the need of any external programs like Total Commander! so can anyone explain what would be the advantage of doing this in TC? TC would have to use a specific list format, so a conversion to that format would still be needed - and when you do this, you could as well create a batch file directly...
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com