This forum uses cookies. Click X button to hide this message. What is stored? / Privacy
Total Commander Forum Index Total Commander
Forum - Public Discussion and Support
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Overwriting Files With Different Names

 
Post new topic   Reply to topic    Total Commander Forum Index -> Total Commander (English) Printable version
View previous topic :: View next topic  
Author Message
GraemeC
Junior Member
Junior Member


Joined: 27 Aug 2009
Posts: 17

PostPosted: Thu Apr 12, 2018 10:21 pm    Post subject: Overwriting Files With Different Names Reply with quote

I've got a project I hope can be done easier in Total Commander, but not sure the best way to go about it.

I have a series of webpages of captioned photos, and want to replace the old photos with newer, better, similar ones. The problem is that the old photos have nonstandard names, like 0998056812.jpg, as they were pulled off of a site that numbered them in seconds elapsed.

The replacement photos that I've created off of DVD's have names like 001.jpg, 002.jpg, et cetera. Changing 100 hyperlinks in every web file to match the new pictures would be tedious. So, what I'd like to do is copy the new files to the old directory, and overwrite the old ones. (Have 001.jpg overwrite 0998056812.jpg, 002.jpg overwrite 0998056828.jpg, and so on.)

I wouldn't mind doing it one file at a time, as long as it could be done with a quick click or two. Or I could do it in batches. The only hitch is that the new pictures have to match the old ones. So if I have one too many or one too few at a certain point, it would throw the whole sequence off. But I could do it in batches of 10 or so, then check to make sure that the sequence still matches. Provided that there's a way to do it.
Back to top
View user's profile Send private message Send e-mail AIM Address
Stefan2
Power Member
Power Member


Joined: 13 Sep 2007
Posts: 1971
Location: Europa

PostPosted: Fri Apr 13, 2018 1:13 am    Post subject: Reply with quote

Do I see that right? 

You have the old files with good names:
0998056812
0998056828
E
H
U

And you have the new files:
001
002
005
008
010
which you could rename to
0998056812
0998056828
E
H
U


As long as the count match (1:1 relationship, new files same order as old files), you can
- take a list of the old names (cm_CopyNamesToClip and save to text file)
- rename the new files according to names from that list (MRT > Load names from file...)
- copy and overwrite the old files with the new ones. (F5)




If there is no direct 1:1 relationship between both lists, you may have to create a text or xls file with such a relationship on your own.




 
_________________
The destination is one thing. Getting there is everything.
Back to top
View user's profile Send private message
GraemeC
Junior Member
Junior Member


Joined: 27 Aug 2009
Posts: 17

PostPosted: Mon Apr 16, 2018 10:38 pm    Post subject: Overwriting Files With Different Names Reply with quote

Right, that's what I'm trying to do. There's supposed to be a 1:1 correlation between the old files and new, but may not be if I make a mistake creating the new ones.

I tried it the hard way on a sample directory the other day, by creating a list of file names in a batch file. (I usually use a dir /b > !.txt command). Then I went in and manually turned every file name into a rename command (ren 001.jpg 0998056812.jpg, and so forth). It worked, but was very tedious.

What you're adding into the mix that I didn't know is the part about using (MRT > Load names from file...). I'll play with that. If I can rename the new files all at once with that command, it will make the job easy.
Back to top
View user's profile Send private message Send e-mail AIM Address
GraemeC
Junior Member
Junior Member


Joined: 27 Aug 2009
Posts: 17

PostPosted: Mon Apr 16, 2018 11:36 pm    Post subject: Overwriting Files With Different Names Reply with quote

I'm trying it, but I must be doing something wrong. I've got a text file with a list of 10 file names I want to use. Then I have 10 files, named 001.jpg through 010.jpg. So...

Mark
Load Selection from File
Select the text file containing the new names.

And nothing happens. The Help File doesn't explain that command very well, either.
Back to top
View user's profile Send private message Send e-mail AIM Address
Stefan2
Power Member
Power Member


Joined: 13 Sep 2007
Posts: 1971
Location: Europa

PostPosted: Tue Apr 17, 2018 12:44 am    Post subject: Reply with quote

Not "Load SELECTION from File"


Rather:
- mark files
- open MRT (menu Files > Multi-Rename Tool)
- Load names from file... (press F1 key in MRT to read the help and see the related icon)





 
_________________
The destination is one thing. Getting there is everything.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Total Commander Forum Index -> Total Commander (English) All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Imprint/Impressum: This site is maintained by Ghisler Software GmbH
Privacy Policy | Datenschutzerklärung | Politique de Confidentialité

Using phpBB © phpBB Group