Moving files and folders in Adobe Lightroom by manipulating the database

Moving files and folders in Adobe Lightroom by manipulating the database



Many of us use Lightroom to our collection. There are occasions when you want to move the files to another location. Rename folders on a system is very fast and easy, but breaks the link between files and Lightroom.

I know that Lightroom can move the collection of photos, but for various reasons, files and folders had been moved to a new location outside of Lightroom if I needed a way to tell Lightroom that files and the structure had moved.

I knew Lightroom stores all image information in a database and use Firefox SqlLite I could access it. The instructions were carried out here on the basis of data Lightroom 2.5. I have not checked it with another version. Before starting. If you follow this advice, I recommend you save your data file in Lightroom in case it goes wrong.

I downloaded SQLite Manager for Firefox available from "https://addons.mozilla.org/en-US/firefox/addon/5817" Once installed SQLite Manager term (menu Tools and then SQLite Manager) This 'is a superb graphic display to help you manipulate a file database.

SQLite open without selected database. You will need to use the Open folder to access the file data Lightroom icon. The tooltip will show that this icon is called "Connect data base." Now we need to open the data file.

The dialog box will appear and search for files you need to navigate to the folder containing your file Lightroom. Do not forget to change the file type SQLite DB file for all files if the right data file can not be found. Select your data file.

data files have Lightroom extension.lrcat time you open the SQLite file should now have the name and location of the open up the screen file.

The left pane lists the tables in the database. The right panel is the place where we can look at the structure of the data file and execute the SQL database. Tables of interest are AgLibraryFile, AgLibraryFolder and AgLibraryRootFolder.

In this example, the photos are stored on the drive "S: \ photo libraries" but have been moved to "D: \ Documents". Follow these steps:

Click on the "Execute SQL"
Type the following SQL statement: UPDATE SET AgLibraryFile robustRepresentation = replace (robustRepresentation, 'S: \ "," D: \ Documents \') WHERE AgLibraryFile.robustRepresentation as "% S: \ images Libraries \%"
Click Run SQL
Replace with the previous statement: UPDATE SET AgLibraryFolder robustRepresentation = replace (robustRepresentation, 'S: \ "," D: \ Documents \') WHERE AgLibraryFolder.robustRepresentation as "% S: \ images Libraries \%"
Again on the power button
Replace with new instruction: UPDATE SET AgLibraryRootFolder AbsolutePath = replace (AbsolutePath, 'S: \ "," D: \ Documents \') WHERE AgLibraryRootFolder.absolutePath as "% S :/ libraries images /%"
Finally, click the Execute SQL button
Based Lightroom data should now have been updated to reflect the correct location of the photo files and none of them shall be orphans.