Highlighted

Move photos from one folder to another one

Dec 10, 2019

Copy link to clipboard

Copied

Hello all,

 

I am developing a Lightroom Classic Addon and for this I need to move selected photos from one folder to another one. I am searching the API but I don't find a funtion for this. The LrFileUtils.move doesn't work as expected and tried already:

LrFileUtils.move("[...]/candidates/img1.dng", "[...]/selects/img1.dng")
LrApplication.activeCatalog():addPhoto("[...]/selects/img1.dng")

Then the develop settings are missed. I want only simulate the drag and drop of files in the library module, if you move files from one folder to another folder.

Or as an alternative add a new folder to the library without calling the import. So i am able to create a kind of folder structure via a lua script. But I see only catalog:getFolders() function but no an addFolder().

 

Perhaps anyone of you know this challenge an is able to help me.

Thanks in advance

Thorsten

Topics

SDK

Views

126

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Move photos from one folder to another one

Dec 10, 2019

Copy link to clipboard

Copied

Hello all,

 

I am developing a Lightroom Classic Addon and for this I need to move selected photos from one folder to another one. I am searching the API but I don't find a funtion for this. The LrFileUtils.move doesn't work as expected and tried already:

LrFileUtils.move("[...]/candidates/img1.dng", "[...]/selects/img1.dng")
LrApplication.activeCatalog():addPhoto("[...]/selects/img1.dng")

Then the develop settings are missed. I want only simulate the drag and drop of files in the library module, if you move files from one folder to another folder.

Or as an alternative add a new folder to the library without calling the import. So i am able to create a kind of folder structure via a lua script. But I see only catalog:getFolders() function but no an addFolder().

 

Perhaps anyone of you know this challenge an is able to help me.

Thanks in advance

Thorsten

Topics

SDK

Views

127

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Adobe Community Professional ,
Dec 10, 2019

Copy link to clipboard

Copied

One way to do this is to create the folder where you want the images to go. Then, in the library module, choose the images that you want to move to that folder. You can highlight all of them using the standard method of doing that. Next, right-click on the folder where you want the images to go and choose the option to move the selected images to that folder. That's the way I do it.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 10, 2019

Copy link to clipboard

Copied

Perhaps you've missed that I need to do this programatically. If you can tell me how to make a folder visible in Lightroom (if there is no image imported into this folder already) then my problem is fixed, eg:

 

I create such a structure via

LrFileUtils.createAllDirectories(path)

 

test

-> captures

-> selects

-> trash

 

None of this folders are visible in Lightroom. If I import (with the import dialog of Lightroom) one or more images to captures than captures is visible. How can I manage that selects and trash is visible too, without importing images into it?

 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
JimHess LATEST
Adobe Community Professional ,
Dec 10, 2019

Copy link to clipboard

Copied

I wouldn't know how to do that. It would be necessary to instruct the catalog how to keep track of where the images went, in order to keep everything intact. Someone with a lot more database experience would have to instruct you. Good luck.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...