coppermine-gallery.com/forum

Support => Older/other versions => cpg1.2 Standalone Support => Topic started by: arne on April 24, 2004, 10:36:21 AM

Title: Move pictures in different folders
Post by: arne on April 24, 2004, 10:36:21 AM
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!
Title: Re: Move pictures in different folders
Post by: Joachim Müller on April 24, 2004, 12:19:49 PM
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
Title: Re: Move pictures in different folders
Post by: arne on April 24, 2004, 05:56:33 PM
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?
Title: Re: Move pictures in different folders
Post by: Joachim Müller on April 25, 2004, 07:21:15 AM
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