Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Cox Orange

macrumors 68000
Original poster
Jan 1, 2010
1,814
241
Hello,

I have the problem that my TV saves mts files the following way:
1st 12min. name.mts
2nd 12min. name.mts1
3rd 12min. name.mts2

I would rather like to have it (on my computer)
1st 12min. name.mts
2nd 12min. name1.mts
3rd 12min. name2.mts

So, can someone write me a script (if that is not asking a lot) that replaces "anyname.mtsX" with anynameX.mts"

So to say I only want to move the number from behind the mts before the dot in front of the *mts. The names shall be unchanged.

Mind, the first file belong to one documentary always starts without number.

Thank you. (I don't do coding and only can type in terminal, what people tell me I should type, so I don't know, if it is a bit harsh to ask for something like that).
 
I presume you want to do this because only files ending in ".mts" will play correctly. If that's the case then a simple automator script will do it, albeit in an ugly way. Just make an automator script to add ".mts" to the end of all selected file names. The result will look like this:

1st 12min. name.mts.mts
2nd 12min. name.mts1.mts
3rd 12min. name.mts2.mts
 
perhaps a bit ugly, but it will do it well. Good recommendation. I will have a look into automator and how to work with it.
Thanks!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.