4 Replies Latest reply on Sep 10, 2016 12:11 AM by dg9ngf

    Automate Lightroom to synchronise folders

    dg9ngf Level 1

      I've written a Windows application that copies image files from a memory card to a directory on disk in a configurable manner. This fully automates my work to copy images from a card to my computer and replaces a manual Explorer workflow. Lightroom can't do what I need so I solved it myself. When all files are copied, the card can be safely removed (unmounted) from the system, the program exits and Lightroom can be started, with one click.

       

      Now I need to select the synchronise folder command from within Lightroom manually to actually import the newly copied files into the catalogue. Unfortunately, again Lightroom is not able to do that on its own. Picasa had a nice feature to automatically import all new files that it found in the watched folders. Lightroom's automatic import is completely unusable if the files are already where they belong because it can only work if it may copy the files somewhere first.

       

      My question now is whether and how Lightroom can be automated to run this folder synchronisation command from another process or through some command line switch or automation API so that the user doesn't have to do it. Any new files should be imported with no further interaction.

       

      I could use Windows UI Automation but Lightroom doesn't play well with this assistive technology, only providing very basic areas and controls that cannot easily be identified. The display texts are subject to localisation and their position may change.

       

      Would it be possible to create a Lightroom plugin that starts off this command from within Lightroom and provides a proper automation interface to the outside? How would I write such a plugin?

        • 1. Re: Automate Lightroom to synchronise folders
          wobertc Adobe Community Professional

          I think you are making workflow more difficult than it needs to be.

          the synchronise folder command from within Lightroom manually to actually import the newly copied files...

          This is not the purpose of "Synchronize folder"!

          If you insist on manually copying your files into a destination folder, then a better workflow would be-

          [Import], select the "ADD" option, Choose the Folder, [Import]

           

          Of course if you use the "Copy" option in the Import dialog, then you would not even need your 'Windows Application'- even simpler!  And you can save a Preset to have the same options!

          • 2. Re: Automate Lightroom to synchronise folders
            johnrellis Most Valuable Participant
            Would it be possible to create a Lightroom plugin that starts off this command from within Lightroom and provides a proper automation interface to the outside? How would I write such a plugin?

            You could post in the Lightroom SDK forum, and I and others can get you started: Lightroom SDK..  (Sorry, I can't move your thread.)

            • 3. Re: Automate Lightroom to synchronise folders
              dg9ngf Level 1

              This is not the purpose of "Synchronize folder"!

              If you insist on manually copying your files into a destination folder, then a better workflow would be-

              [Import], select the "ADD" option, Choose the Folder, [Import]

              Well, it works. And that bulky and slow Import dialog is even worse than anything else. Need to navigate to the source folder every time, in a completely not-platform-standard UI. USB drives/memory cards can have different drive letters every day. I will use my own copy application for reasons I am not going to explain here (it's probably useless). It provides convenience features that Lightroom does not.

               

              So I should write a Lightroom plugin for that? Need to look into how that works. I guess I can find some documentation for getting started with that. I was hoping to invoke that single command more easily with a simpler mechanism, like for example with Microsoft Office automation.

              • 4. Re: Automate Lightroom to synchronise folders
                dg9ngf Level 1

                UI Automation is a bit complicated because Lightroom only provides the most basic assistive technology support (I'm wondering whether any disabled people could even use it) but it works fine. I needed to switch to every supported language to learn the menu texts where no other path was available to the UI element I need. A bit ugly, but that's about the level of cooperation I had expected from Adobe. I wasn't disappointed.