• Welcome to the Lightroom Queen Forums! We're a friendly bunch, so please feel free to register and join in the conversation. If you're not familiar with forums, you'll find step by step instructions on how to post your first thread under Help at the bottom of the page. You're also welcome to download our free Lightroom Quick Start eBooks and explore our other FAQ resources.
  • Stop struggling with Lightroom! There's no need to spend hours hunting for the answers to your Lightroom Classic questions. All the information you need is in Adobe Lightroom Classic - The Missing FAQ!

    To help you get started, there's a series of easy tutorials to guide you through a simple workflow. As you grow in confidence, the book switches to a conversational FAQ format, so you can quickly find answers to advanced questions. And better still, the eBooks are updated for every release, so it's always up to date.

lua files, what are they and can they be deleted?

Status
Not open for further replies.

stevedo

Member
Joined
Jan 7, 2014
Messages
76
Lightroom Experience
Intermediate
Lightroom Version
Lightroom Version Number
Lightroom Classic 10.1
Operating System
  1. Windows 10
I have recently started to use sync from the Lightroom camera on my Samsung phone to Lightroom Classic. I've noticed that in the "Lightroom's synced images:" in LrC that there are .lua files. I don't leave the synced photo files in the folder to which they are synced but move them to a more appropriate location (using Lightroom). This leaves behind a .lua file. Due to the fact that there is a file in the folder, when I remove the folder from within Lightroom it is not actually deleted from the file system. So, for now, I've left them where they are. I sync the files on a folder for each day basis, therefore I now have a few folders with just .lua files in them. I did rename one to see what would happen in Lightroom and did not notice any detrimental effect. I'm now at a stage where I want to clean up my sync folders i.e. delete those that just contain .lua files.

I'm really not sure if they can be safely deleted or not? Any ideas?
 
These info.lua files are added by sync to control syncing from each device, but they have no value afterwards and get left if the folder if you move or delete the photos. As you say, they interfere with deleting those folders, but you can safely delete them.
 
Find attached a little script that I use to delete them automatically. Setup instructions are in the file.
 

Attachments

  • Delete info.lua and pm_lock files.txt
    1.8 KB · Views: 305
The LUA is an embeddable scripting language used by Lightroom. The file should be plain text and readable in any text editor. I’ve never seen these associated with sync’s files and I don’t know why they would be unless the sync process needs the scripted files temporarily and would normally delete them afterward. You can delete the otherwise empty folder with the LUA files too.
You can set LrC to automatically import to the Date named folder structure as you would for a regular import.This would eliminate the need to move them later.


Sent from my iPad using Tapatalk
 
Last edited:
I’ve never seen these associated with sync’s files and I don’t know why they would be unless the sync process needs the scripted files temporarily and would normally delete them afterward.
If you set sync's download location so it organizes by date, you then see an info.lua file in each day's folder.

It needs them temporarily but fails to delete them afterwards, so the delete folder code removes the folder rather than deletes it.
 
Find attached a little script that I use to delete them automatically. Setup instructions are in the file.

Hi John, thanks very much for confirming that the files can be safely deleted. Your script will prove to be very useful :)
 
I’ve never seen these associated with sync’s files and I don’t know why they would be unless the sync process needs the scripted files temporarily and would normally delete them afterward. You can delete the otherwise empty folder with the LUA files too.

If you set sync's download location so it organizes by date, you then see an info.lua file in each day's folder.

It needs them temporarily but fails to delete them afterwards, so the delete folder code removes the folder rather than deletes it.

My experience is exactly as John describes. Always get a .lua file when syncing to local folders.
 
IIRC open them in a text editor and you'll find they simply list the devices from which photos have been synced - eg Johns iPhone.
 
When I run it on my Mac it dies on line 39 with a null pointer error in getpath(). I just might have to learn a new coding language.


Sent from my iPhone using Tapatalk
 
Run it when a folder is selected.

The idea is that it loops through the active folders, finds any of these info.lua files, and deletes them from the folder. As I would only ever run it in a folder, I never bothered adding error handling, eg for when a collection is active.
 
Run it when a folder is selected.

The idea is that it loops through the active folders, finds any of these info.lua files, and deletes them from the folder. As I would only ever run it in a folder, I never bothered adding error handling, eg for when a collection is active.

Gotcha... still think I need to learn more about this - can’t be any harder than C, Perl and Java - right? I have downloaded all the API stuff from Adobe. Might be something to help get thru the last months of C-19.


Sent from my iPhone using Tapatalk
 
Status
Not open for further replies.
Back
Top