Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Convert files and keep structure  (Read 2492 times)

0 Members and 1 Guest are viewing this topic.

Tchit

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 22
Convert files and keep structure
« on: December 20, 2007, 01:06:17 pm »

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 !
« Last Edit: December 21, 2007, 07:39:51 am by GauGau »
Logged

Nibbler

  • Guest
Re: Convert files and keep structure
« Reply #1 on: December 20, 2007, 05:20:57 pm »

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

Tchit

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 22
Re: Convert files and keep structure
« Reply #2 on: December 20, 2007, 05:28:24 pm »

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

Nibbler

  • Guest
Re: Convert files and keep structure
« Reply #3 on: December 20, 2007, 05:30:20 pm »

Run an SQL query to change them all at once.
Logged

Tchit

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 22
Re: Convert files and keep structure
« Reply #4 on: December 20, 2007, 05:48:19 pm »

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 !
Logged

Nibbler

  • Guest
Re: Convert files and keep structure
« Reply #5 on: December 20, 2007, 05:58:41 pm »

Something like

Code: [Select]
UPDATE cpg_pictures SET filename = REPLACE(filename, '.wmv', '.flv')

Backup first.
Logged

Tchit

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 22
Re: Convert files and keep structure
« Reply #6 on: December 20, 2007, 06:24:54 pm »

Thank you thousand times !

As soon as I convert my files I'll try this.
Logged
Pages: [1]   Go Up
 

Page created in 0.021 seconds with 20 queries.