Move pictures in different folders Move pictures in different folders
 

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]

Main Menu

Move pictures in different folders

Started by arne, April 24, 2004, 10:36:21 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

arne

Hi everyone,

I've got a problem  ;)
CPG vers. 1.2.1

I've created several subfolders via ftp, because my "userpics" folder had to many pics.
well, i thought some more subfolders should be better to have a nice view of what I've got in my different albums.

here's the problem:
if I move pictures via ftp from "userpics" to "newsubfolder" I have to retitle and redescribe all this pictures! I reckon I#ll also lose all views and comments.

is there any sollution to move pictures to different folders without redoing everything?

any help is appreciated!

Joachim Müller

1) once the pics are in the database you mustn't touch them with ftp (don't move nor rename)!
2) Do not ftp-upload files to "userpics" - instead: create subfolders within "albums".
3) Better check the documentation that comes with coppermine: http://coppermine.sourceforge.net/manual.php#batch_add_pics

GauGau

arne

Hi GauGau

great, I better read next time before I'm using an easy looking tool  ::)

I've created the subfolders already. There's probably no other opportunity to move these pictures? maybe with php myAdmin?

Joachim Müller

sure, if you know your way around in phpMyAdmin (backing up your db before "playing" with it strongly recommended):
move your folders and then run the proper queries on the db. Coppermine stores picture paths relatively to the folder you specified in coppermine config. Files you added with batch-add end up with a relative path to the "albums" folder.
You could use a query like this:
QuoteUPDATE `cpg11d_pictures` SET `filepath` = 'new/path/to/pics/' WHERE `aid` = '22';
Replace the pink stuff with your table prefix, the red stuff with your new relative path (the path you moved your pics to, must be a relavtive path from the albums dir) and the orange value with the album id (aid) of the album the pics are in.
HTH

GauGau