Copy link to clipboard
Copied
I accidentally deleted a folder were I had the raw + the edited files, exported from lightroom. I still have a backup on a different hdd with the raw files, and I can still see them in lightroom (greyed now) but I re-named the photos in lightroom before exporting them a few weeks ago. If I copy the folder back on that hard disk with the raw files, can I still re-sync them in lightroom if the names of the photos are different? Is there something I can do? There are 1200 files erased and I hope I don't have to edit them again.
Thanks in advance
Copy link to clipboard
Copied
Yes, you can re-connect the photos (not re-sync) in Lightroom one by one.
Please note: importing photos, and synchronizing the folder, will not fix this problem.
Copy link to clipboard
Copied
The edits and adjustment are recorded in the lightroom catalog.
Put your files in the correct location on your hard drive then from within Lightroom click the "!" mark on one of the files and select Locate.
Find the file in question and link it. You'll get a dialog:
The file will be reconnected, the Lightroom catalog will reflect the original name. As @dj_paige notes you willl have to do this for each file.
OR.
Rename the original files in the Finder / Windows Explorer after copying from the backup drive. Then Lightroom will be happy. And the whole process will take much less time assuming your naming convention is logical.
Copy link to clipboard
Copied
Thank you a lot!
I copied the folder with all the raw photos where they first were.
But how can I associate them if the edited photos in lightroom are completely grey?
Copy link to clipboard
Copied
For now, don't do anything else with these files. Do not use Folder > Synchronise.
Select one of these greyed-out photos. Switch the Metadata panel's view to EXIF + IPTC. Is the original filename field visible?
Copy link to clipboard
Copied
Yes, I can see the original name of the files too! Thank you so much!
Copy link to clipboard
Copied
OK, then there's a trick that should work. It is to create dummy files with names exactly matching the missing ones, making LR think the files are no longer missing. You can then use LR's renaming tool to rename those dummy files back to the original file names, and finally you replace the dummy files with the real files from the backup. See what I mean?
Check back tomorrow and I'll post a script that handles the creation of the dummy files.
Copy link to clipboard
Copied
I re-connected 100 one by one but I have 1100 more, it takes me a lot of time, haha:) Looking forward to hearing from you soon! Thanks a lot John
Copy link to clipboard
Copied
If this isn't clear, please ask me to explain again until I have explained it properly .
So, use Notepad or TextEdit and copy everything below my signature into a text file - notice how the first lines contain setup instructions - generic ones for scripts like this.
1. Once you have followed those setup instruction, the script should be in the Scripts folder, so reopen LR and check that there is a Scripts menu to the right of Help (it's a funny S on Mac). Don't run it yet!
2. Then backup your catalogue
3. You will need to put a jpeg called dummy.jpg on your desktop. The script copies this multiple times, fooling LR into thinking the copies are the missing files. This will allow LR to rename them to the original filename.
4. Now reopen LR and select the files (just try a few at first to test)
5. Run the menu Script > YOURFILENAME - the files should no longer be missing but will all look like the dummy file
6. Rename the files using the Original Filename
7. In Explorer, delete the renamed dummy files and put the backup files in their place.
John
--[[
Fixes where user has deleted files renamed in catalogue but has copies with original filenames
Copies dummy file into missing file locations
You then rename the dummy files in LR using the original filename
Finally, in Explorer/Finder, delete the dummy files and put the unrenamed files in their place
SETUP INSTRUCTIONS
Temporarily save this file onto your desktop and call it "YOURFILENAME.lua".
Now you need to create a scripts folder:
In Lightroom, choose Lightroom > Preferences (Mac OS) or Edit > Preferences (Windows).
Choose the Preset tab and select Show Lightroom Presets folder.
Create a folder in the Lightroom folder called Scripts.
Copy the "YOURFILENAME.lua" script into the Scripts folder.
Quit and reopen Lightroom.
You should now see a little scripts menu to the right of the Help menu. It has a single item Title case keywords.
--]]
------------------------------DON'T CHANGE BELOW
local LrPathUtils = import 'LrPathUtils'
local LrFileUtils = import 'LrFileUtils'
local LrTasks = import 'LrTasks'
local LrDialogs = import 'LrDialogs'
local SEP
if MAC_ENV then SEP = '/' else SEP = '\\' end
LrTasks.startAsyncTask( function()
srcPath = LrPathUtils.getStandardFilePath( 'desktop' ) .. SEP .. "dummy.jpg"
if LrFileUtils.exists( srcPath ) ~= "file" then
LrDialogs.message("Create a dng called dummy.dng and put it on your desktop", srcPath)
return false
end
local catalog = import "LrApplication".activeCatalog()
photos = catalog:getTargetPhotos()
filePaths = {}
for i, photo in ipairs(photos ) do
if photo:checkPhotoAvailability() == false then
destPath = photo:getRawMetadata('path')
LrFileUtils.copy( srcPath, destPath )
end
end
LrDialogs.showBezel("Finished", 5)
end)
Copy link to clipboard
Copied
Hello,
I did everything you said. I run the script and it even showed the "Finished" message, but nothing happened. The photos were still grayed out.
I know that the script at least runs because if I run it without the "dummy.jpg" it gives me an error.
I'm using Lightroom 5.7.1
Copy link to clipboard
Copied
The script assumes things are "perfect" and doesn't have any error routines.
It may be that the folder in Finder isn't named exactly the same as LR thinks the folder is named. Check that.
Take one of the missing images and see what is in the folder.
If nothing is obvious, contact me via my LR site.
Copy link to clipboard
Copied
odrida wrote
Thank you a lot!
I copied the folder with all the raw photos where they first were.
But how can I associate them if the edited photos in lightroom are completely grey?
By renaming the files in the folder to match what Lightroom thinks they should be called.
Copy link to clipboard
Copied
You're not wrong, but the OP has 1200 of them.
Copy link to clipboard
Copied
True. Im rather spoiled on the Mac with its Automator app. I am assuming of course the OP is using a PC - though I see no statements of such in the post.
Copy link to clipboard
Copied
Thanks for helping me I'm using Mac.
Copy link to clipboard
Copied
whats the status of this? have you contacted john? do you need help with automating the renaming?
or did you just plod through one by one?
Find more inspiration, events, and resources on the new Adobe Community
Explore Now