# automated copy folder tree to collection tree



## snapper (May 16, 2016)

I have a requirement to be able to copy a folder tree to a collection tree. I know you can drag a folder to create a collection, but it doesn't recognise the subfolders in the folder. 

I'm looking to move my website to one based on Photodeck - and they have a nice publish plugin - but you have to create the hierarchy of folders in the publish collection yourself. It's not too much work but it would be beter if it were automated.

My current workflow uses folders rather than collections. I ingest into them, and then sort into subfolders. I know I could manage this with keywords and Smart collections - but it's making things more complicated than necessary, and some of my events the images are already sorted into subfolders, so I just import the folder tree  as is.

Rob Cole used to have a folders to collection plugin - with the source code - but searching for an archive copy brings up nothing  - does anyone have this? I'd be happy to modify something that works..

Otherwise I have an example from the Adobe SDK forum Writing a plugin to create Smart Collections |Adobe Community - which creates collections and also creates smart collections. I don't want to use smart collections, but I want to see if I can modify this to create a publish collection. It's just a bit old, so may not be the most efficient example.

It also strikes me that this doesn't have to be a full blown plugin, but can be a script.


----------



## clee01l (May 16, 2016)

Jeffrey Freidl Has Collections and Folder publishers but nothing that would copy a folder structure to a collection structure.  It might be scriptable.  However, Folders can contain both files and subfolders.  Only Collections can contain images. Collection sets can only contain other Collection sets and Collections and *no* images.  Your script would only work IF only the lowest level sub folders could be converted to a static Collection and all parent folders were empty of image files.


----------



## snapper (May 16, 2016)

Yep, checked Jeffery's site first for a solution  

My currrent workflow matches the limitations you mention - and creating a collection set containing collections of images would be exactly what I want...with the ultimate aim of creating something like this in the Publish Services.


----------



## tspear (May 16, 2016)

Skip the collection, and just use Jeff's Folder publisher. It matches what you are ultimately trying to accomplish.
And this is what I still use for part of my workflow (I am slowly, emphasis on slowly) moving to collections by folder's are still my primary organization tool.


----------



## snapper (May 16, 2016)

@tspear - thanks - but I want to be able to create a set of collections within a publish service. I don't think Jeffery's Folder publisher will help there....it creates a copy of the folders, and the image files on disk as a new publish service. The publish service I'm aiming to use is a plugin provided to connect specifically to Photodeck and create a set of galleries.


----------



## clee01l (May 16, 2016)

I have Publishing service that I use which has similar requirements.  In it, I have set up Smart Publish Collections to meet the requirements.  The Publish Service Smart Collections are controlled by special internal use only keywords.   All of my collections and Publish Services are Smart except for one static collection that is necessary to start my workflow.   Once you start organizing inside of LR instead of the filesystem, folders become irrelevant to organization.  Folder names like "On the Way", "People", "presentations", "the finish", "the start" etc. are keywords that describe the conditions about the image. The have no importance in forcing a location in a folder in the filesystem. 

If you create Smart Publish Service Collections for the PhotoDeck publishing service onetime, the Publish Service will manage itself and all you need to do is assign the keywords (in less time than it takes to move images around in the filesystem).


----------



## snapper (May 16, 2016)

@clee01l - I think you may have misunderstood my requirement, but a single one time set of smart collections that are created by keyword will not work - partly because the collection name becomes the gallery name (and I don't think you can dynamically change the name of smart collection using a keyword). I create new galleries on a week by week or day by day basis, I rarely add to them. They have a finite lifetime and ten they disappear. It's not a portfolio site where your methodology would work.

And the publish service doesn't support the use of a smart collection - though this may be a bug, and as the publish service is open source it may be able to be changed. So while I agree that I could manage everything by keywords, I prefer to have a level of abstraction in a folder structure.


----------



## rob211 (May 20, 2016)

I dunno if it will help but when I needed folder info (i.e. path) I got referred to Mr. Beardsworth's excellent script to add paths to keywords: Copy Mac Finder paths to keyword hierarchy?

It appears you wouldn't be able to use smart collections to essentially replicated the folder structure, but it might be a building block in such a workflow.

As in the case of publish collections/photosets and regular collections, the interaction between these structures isn't ideal. Let us know if you find something.


----------



## laszlo.suto (Mar 1, 2019)

Hi, Snapper so far have you any solution for your problem cause I face the same issue as you had? Thanks in advance,
Laci


----------



## johnbeardy (Mar 1, 2019)

It's now a built-in menu item - right click a folder and choose Create Collection / Set


----------



## gbbiv (Apr 10, 2020)

johnbeardy said:


> It's now a built-in menu item - right click a folder and choose Create Collection / Set


Is there a way to have that feature allow you to put the new Collection Set into a Publish Service?


----------



## johnbeardy (Apr 10, 2020)

I don't think so.  If there's a real need, I have let a few people use an unreleased plugin of mine, but a publish service has crucial differences from collection sets. It's unlikely that the service's plugin author will have expected another plugin to insert collections/photos and I would expect problems - eg connecting a published collection with the online gallery or whatever.


----------



## gbbiv (Apr 10, 2020)

johnbeardy said:


> I don't think so.  If there's a real need, I have let a few people use an unreleased plugin of mine, but a publish service has crucial differences from collection sets. It's unlikely that the service's plugin author will have expected another plugin to insert collections/photos and I would expect problems - eg connecting a published collection with the online gallery or whatever.



Yeah, I've been moving from old web gallery generation software that worked off a folder system and FTP to gallery generation software that works off a Publish Service and I'd like to figure out how to get the old stuff in there.  Adding new stuff is easier to manage it's getting a significant volume of old stuff in there that I'm challenged with.  A legitimate question might be, why on earth do you have over 1500 folders and over 200,000 images... but that's what I have.   A large portion of which probably don't matter, kids sports stuff from local school from a while back, but I find it hard to get rid of and even the effort to cull would be a bit time consuming.


----------

