Change filename of covers

If you need help on how to use the program
Post Reply
z3us
Posts: 86
Joined: 2008-02-19 17:36:53

Change filename of covers

Post by z3us »

Hi
I would like to change the filename of all the covers in my collection, replacing it with the filename of the video.
So, if I have this video:
Groundhog Day [HDrip][Dual].mkv
, the filename of the cover would change from films_1234.jpg to Groundhog Day [HDrip][Dual].jpg

And, if possible, I would like to move the cover to the folder where the video is placed.
Is this possible?

Thanks
antp
Site Admin
Posts: 9651
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

Hi,
Currently the picture file name cannot be handled by script within AMC.
The solution for this kind of things would be to make an external tool (using any programming language) which would edit the name of the picture in the .amc or .xml catalog and rename covers at the same time.
z3us
Posts: 86
Joined: 2008-02-19 17:36:53

Post by z3us »

And if I download all the covers again? Is it possible to use same filename as video?
antp
Site Admin
Posts: 9651
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

No, sorry.
z3us
Posts: 86
Joined: 2008-02-19 17:36:53

Post by z3us »

Arghhhh.
Thanks anyway
bad4u
Posts: 1148
Joined: 2006-12-11 22:54:46

Post by bad4u »

Technically it even should be possible to use AMC's scripting engine for that job, but it would need a complete new script.

You can use the file operations in scripting engine to load a catalog file in xml format (not "open" a catalog via menu) and copy it to a TStringList variable, then read the (relative) paths to pictures, use CopyFile to copy pictures to new filenames (preferably to a new folder, just to avoid any file conflicts) and finally change the path and filenames in the xml file. I did some similar file operations in the first versions of update_script, I think.

Still it isn't possible to do this modifications to the catalog if you just open it in AMC.
z3us
Posts: 86
Joined: 2008-02-19 17:36:53

Post by z3us »

Thanks, but I don't have any idea about scripting. I will do it manually
antp
Site Admin
Posts: 9651
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

bad4u wrote:Technically it even should be possible to use AMC's scripting engine for that job, but it would need a complete new script.
Yes but that falls under what I said:

Code: Select all

make an external tool (using any programming language) 
Here AMC would be used as a scripting tool and not for its original purpose :D It would be much easier to do that in PHP or something like that ;)
Post Reply