Help writing renamer script

Advanced Renamer forum
#1 : 18/09-21 06:46
David
Posts: 1
Hi there!

I have files named like this :

Lorem ipsum dolor sit amet.mp4
consectetur adipiscing elit.mp4
Nullam nunc libero.mp4
tristique rhoncus bibendum in.mp4
Sub 1.txt
Sub 2.txt
Sub 3.txt
Sub 4.txt

im looking for a way to replace txt file name with Video name.

I want the result is like this :

Lorem ipsum dolor sit amet.mp4
consectetur adipiscing elit.mp4
Nullam nunc libero.mp4
tristique rhoncus bibendum in.mp4
Lorem ipsum dolor sit amet.txt
consectetur adipiscing elit.txt
Nullam nunc libero.txt
tristique rhoncus bibendum in.txt

thanks
#2 : 18/09-21 18:59
David Lee
Posts: 1125
The problem will be correlating the .txt files with the correct .mp4 files.

However if you can load the files into the list in the correct order (or sort the list eg using modified time) then it will be straightforward using the List method.

Load the .mp4 files into the list (one way is to Add Directories... with the Mask "*.txt) and sort if necessary.

Open a List method , select Apply to: Name and click Populate List to copy the filenames.

Clear the List and load the .txt files and make sure that they are in the correct order.

The names in the List method will be used to rename the corresponding files in the file List when you run the Batch.