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: Batch adding files from a location out side of the CPG album folder in windows  (Read 3138 times)

0 Members and 1 Guest are viewing this topic.

retrofit

  • Coppermine newbie
  • Offline Offline
  • Posts: 1

I needed to add and store files in a different location than the CPG album folder (such as D:\pictures instead of C:\pathtowebdocs\cpgallery\albums), but I quickly found that there was no support for this in CPG. I tried to create an NTFS Junction using winbolic link http://www.pearlmagik.com/winbolic/, but under Windows 2003 SBS the contents of the linked folder were not accessable due to "The filename, directory name, or volume lable syntax is incorrect". However, I tried winbolic link on Windows XP Pro and it apeared to work just fine. After hunting around for a cupple days I had almost decided that Windows 2003 just plain didn't support NTFS Junctions, and NTFS Junctions are looking more and more like the only way to do this.

Wikipedia to the rescue! Read about NTFS Junction point on wikipedia
BE SURE TO READ THE WARNING! hehe - (also one warning that is not very obvious in the warning is you DO NOT want to create a junction point to link to a parent folder... for example C:\Documents and Settings\user\Desktop\userfolder linked to C:\Documents and Settings\user creates a bottomless pit in the directory structure...)
Probably the most important info to get out of the warning is that whatever happens in/with the junction point folder happens in the targeted folder as well, and vice versa. If you set up a junction point to your already existing image repository, and then let CPG loose on it you could end up loosing some of your pictures. It's important to understand that CPG assumes it has full reign over the album folder. It creates different sized preview images of existing images, and more importantly if an image is deleted in CPG it also deletes the "origional image" as well.

With that said, wikipedia lead me to How to create and manipulate NTFS junction points.
I used linkd.exe from Windows Server 2003 Resource Kit Tools which also works on Windows XP. I'm not sure about Windows 2000... Maybe it comes with linkd.exe?

What I did was create a folder named webalbum in my main picture, and named the junction point folder in the CPG album folder webalbum(for example:linkd.exe "c:\pathtowebdocs\cpgallery\albums\webalbum" "d:\pictures\webalbum"). This way I copy images I want to put on CPG to the webalbum folder, and not worry about what CPG does to them.

Cheers

« Last Edit: September 06, 2006, 10:54:00 am by GauGau »
Logged
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 19 queries.