Skip to main content
Participating Frequently
July 10, 2015
Question

Moving files using the Lightroom SDK

  • July 10, 2015
  • 1 reply
  • 1559 views

I've been playing with the Lightroom SDK and I'm trying to move files within Lightroom.

I can use the SDK to create a folder and move the file into it but Lightroom does not know the file has moved.

Is there a way to tell Lightroom the files has moved using the SDK?

This topic has been closed for replies.

1 reply

johnrellis
Legend
July 13, 2015
Is there a way to tell Lightroom the files has moved using the SDK?

Unfortunately not.  The SDK doesn't provide any file operations (delete, move, rename) for files already imported into the catalog.

Participating Frequently
July 14, 2015

The Lightroom SDK can move files using the LrFileUtils Class, unfortunately Lightroom itself doesn't then know that you've moved them so they go missing.

That's the issue.

johnrellis
Legend
July 14, 2015
The Lightroom SDK can move files using the LrFileUtils Class, unfortunately Lightroom itself doesn't then know that you've moved them so they go missing.

To clarify, you can't do file operations (delete, move, rename) to LrPhoto objects in the catalog, as a user can.  As you've discovered, using LrFileUtils to move the underlying files is the same as moving them with Finder / File Explorer -- LR won't know the new location and will mark the files as missing.