Pages: [1]   Go Down

Author Topic: Finding files on a new network drive  (Read 1534 times)

Jim Kasson

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 2370
    • The Last Word
Finding files on a new network drive
« on: January 27, 2015, 07:41:40 pm »

The NAS box Anne died. I replaced it with a NAS box named Elsie. Anne had a shared folder called Images B. I copied all the files in that folder from a backup to Elsie. I shared the folder on Elsie. Unsurprisingly, Lr couldn't find the files.

I went to the shared folder in the Library module of Lr. It listed the path name \\anne\Images B. I couldn't find any way to change that to \\elsie\Images B \. So I went through and laboriously showed Lr where every darned top-level folder in Images B was. What a pain.

I remember doing this before, years ago.

My question: is there a way to tell LR about the new shared folder without going through the pain of telling it about every top-level folder within the share?

Jim

crabby

  • Newbie
  • *
  • Offline Offline
  • Posts: 32
    • MICHAEL CRABB
Re: Finding files on a new network drive
« Reply #1 on: January 27, 2015, 08:24:07 pm »

I think you should have named your new drive "Anne". Then LR wouldn't know the difference.
Logged

Jim Kasson

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 2370
    • The Last Word
Re: Finding files on a new network drive
« Reply #2 on: January 27, 2015, 08:33:11 pm »

I think you should have named your new drive "Anne". Then LR wouldn't know the difference.

Yes, but I've had problems with Windows Domains when you reuse an old name.

Jim

fdisilvestro

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 1853
    • Frank Disilvestro
Re: Finding files on a new network drive
« Reply #3 on: January 27, 2015, 09:48:54 pm »

You can avoid that in the future by having a single image in the Images_B folder and import it into LR. When you change the shared folder, you just have to locate the Images_B folder in the new location and it will show all the subfolders in it. If you don't have any image in that "root" folder (Images_B) Then you will have to update every single folder in it as you just found out.

However, if you are confident manipulating databases, it can be done updating directly the database with any tool that can open the LR catalog (which is just an SQLite database)

Use this at your own risk!!!


The following info applies to LR 5.7.1 (table fields might change between versions)

Perform the following in a copy of the catalog, in case something goes wrong:

- make sure that you previously added the new shared folder in the import dialogue (i.e. Elsie)

- Open the LR database in a SQLite editor (I use SQLite expert personal, but you can choose any of the available applications)

- you have to change the values of the shared folder in the table "AgLibraryRootFolder" in the columns/fields: "absolutePath"; "name" and "relativePathFromCatalog"
Note: depending on how you imported the pictures, the fields "name" and "relativePathFromCatalog" might be empty (null)
The attached image is a screenshot of the content of table "AgLibraryRootFolder" using the SQL editor where I tested the procedure explained here:

The following are the scripts (SQL) that you would need to execute to update the fields (I have used your shared folders names)

Script 1: update field "absolutePath":

     update AgLibraryRootFolder set absolutePath = replace( absolutePath, '//Anne/', '//Elsie/') WHERE absolutePath LIKE '//Anne/%';

Script 2: update field "name":
     update AgLibraryRootFolder set name = replace( name, '\\Anne\', '\\Elsie\') WHERE name LIKE '\\Anne\%';

Script 3: update field "relativePathFromCatalog":
    update AgLibraryRootFolder set relativePathFromCatalog = replace( relativePathFromCatalog, '//Anne/', '//Elsie/') WHERE relativePathFromCatalog LIKE '//Anne/%';


Open LR with the updated catalog and everything should be in place.
Remember: Do this in a copy of the catalog in case something goes wrong

« Last Edit: January 27, 2015, 09:52:35 pm by FranciscoDisilvestro »
Logged

Jim Kasson

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 2370
    • The Last Word
Re: Finding files on a new network drive
« Reply #4 on: January 28, 2015, 12:00:29 am »

You can avoid that in the future by having a single image in the Images_B folder and import it into LR. When you change the shared folder, you just have to locate the Images_B folder in the new location and it will show all the subfolders in it. If you don't have any image in that "root" folder (Images_B) Then you will have to update every single folder in it as you just found out.

That's a great workaround. Thanks!

Jim

Ps. The SQL stuff was very impressive, but I'll stick with your simple solution.
Pages: [1]   Go Up