Convert files and keep structure Convert files and keep structure
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Convert files and keep structure

Started by Tchit, December 20, 2007, 01:06:17 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Tchit

Hi !
First of all, thank you for the fabulous Coppermine :)


This is my question :

I am hosting a Coppermine album with thousands of videos. I am planning to convert all those videos from wmv to flv. But I would like to keep my album as they are, with comments, ratings and number of views. This means the only thing that would change would be the extension of the name of the movie. The URL wouldn't change.
For example the file "movie12568.wmv" would be now : "movie12568.flv" in the same directory, with the same URL, and with the same jpeg file as thumbnail.

Is it possible to do ? And how difficult it is ?


Thank you very much !

Nibbler

You can edit the filename directly in the database using phpmyadmin.

Tchit

Yes but what if I want to change the extension of 7000 files ?  :'(

Nibbler

Run an SQL query to change them all at once.

Tchit

Ok thank you, I need to learn this.
I know this is not exactly about Coppermine but do you have any clue where I should look ? Is it a difficult SQL query ?


Thank you very much !

Nibbler

Something like


UPDATE cpg_pictures SET filename = REPLACE(filename, '.wmv', '.flv')


Backup first.

Tchit

Thank you thousand times !

As soon as I convert my files I'll try this.