[mythtv-users] How do I undo a mythrename oops?

Michael T. Dean mtdean at thirdcontact.com
Mon Aug 25 02:25:32 UTC 2008


On 08/24/2008 07:37 PM, Robin Hill wrote:
> On Sun Aug 24, 2008 at 06:11:50PM -0500, Craig Huff wrote:
>> On Sun, Aug 24, 2008 at 5:38 PM, Craig Huff wrote:
>>     
>>> I managed to accidentally run mythrename without parameters and it
>>> obligingly renamed all the files in /video/recordings.
>>>
>>> Gaaaahhh!  Head hung low in shame with egg on my face.  Gotta watch
>>> those errant carriage returns!
>>>
>>> They're still there, but...  How do I figure out what the right names
>>> are for each of them?
>> Okay... This is not what I expected...  Most of the videos are usable
>> with the revised filenames.  It's not the use I normally make of
>> mythrename, but perhaps that was one of its intended functions -- to
>> rename the 1073_20080103025800.mpg type files to human readable form
>> and update the database so MythTV can find them to show?
> That was the primary function, yes - hence what it does by default.
>> If that's the case, then the problem becomes: "How do I find the ones
>> whose filenames don't match what MythTV expects and then how do I fix
>> them, and is there an easier way to find them than manually trying to
>> play each one in MythTV?"
> There shouldn't be any that don't match - I'm pretty sure mythrename
> works from the database, so any file renamed will exist (and be updated)
> in the database.
>   

Whether the filename that's created matches the updated filename that's 
written to the database, however, is not guaranteed due to forces beyond 
mythrename's controls (filesystems, encodings, ...).

> If you want to rename them back then you can just rerun mythrename with
> the appropriate template string (which I think is "%c_%Y%m%d%H%i%s").
>   

Yes, as discussed here: 
http://www.gossamer-threads.com/lists/mythtv/users/331410#331410 .  Also 
at that link is a description of some of the reasons why you may not 
want to every (purposefully) rename recording files with mythrename.pl 
.  And, I highly recommend you do put them back (for those reasons 
discussed in the above link).

Mike


More information about the mythtv-users mailing list