Updating a Large Number of Links

Any trouble you encounter with the Pedias, here's the place to ask for help.
Post Reply
spishak
Bruji Friend
Bruji Friend
Posts: 12
Joined: Sun Jun 14, 2015 11:54 am

Updating a Large Number of Links

Post by spishak »

I recently bought a new, larger external drive and want to change all the links in DVDPedia that are pointing to movies on the old drive to point to the exact same movies on the new drive. Let's say I have 1,000 movies neatly and beautifully catalogued residing on Drive1 ... I then copy the entire library of movies (using the Finder), from Drive1 to new Drive2. Can I update all 1,000 links in DVDPedia to point to Drive2 without editing each record individually? I'm hoping so, and thankful for any help you can provide. --Chris
User avatar
Nora
Site Admin
Posts: 2155
Joined: Sun Jul 04, 2004 5:03 am
Contact:

Re: Updating a Large Number of Links

Post by Nora »

You can do that using the application Terminal found in Applications/Utilities. First though, start by quitting DVDpedia and making a copy of your DVDpedia data folder as a precaution. By default the DVDpedia folder is located in your Home folder under ~/Library/Application Support/DVDpedia. If you don't see the ~/Library/ folder in Home you can use the Finder's 'Go' menu, hold down the Option key and the Library folder will appear.

After that, run Terminal and copy paste the following lines into the window, each followed by a return:

Code: Select all

sqlite3 ~/Library/Application\ Support/DVDpedia/Database.dvdpd
update ZLINK Set ZURL = replace(ZURL, 'file:///Drive1', 'file:///Drive2');
.exit
Then restart DVDpedia and all your links will be updated to the new Drive2 location.
spishak
Bruji Friend
Bruji Friend
Posts: 12
Joined: Sun Jun 14, 2015 11:54 am

Re: Updating a Large Number of Links

Post by spishak »

Thank you so much Nora for the quick and thorough reply. I did add the phrase "Volumes/" to the syntax you provided to get it to work for me. So I structured it like this >>>

sqlite3 ~/Library/Application\ Support/DVDpedia/Database.dvdpd
update ZLINK Set ZURL = replace(ZURL, 'file:///Volumes/Drive1', 'file:///Volumes/Drive2');
.exit

After that, it worked like a charm and saved me oodles of time (and boredom)!
spishak
Bruji Friend
Bruji Friend
Posts: 12
Joined: Sun Jun 14, 2015 11:54 am

Re: Updating a Large Number of Links

Post by spishak »

Hello Nora,

I got an even larger hard drive for my movies!

Updating links to the new drive using your instructions from 7 years ago didn't work this time.

Has the syntax changed that I need to use in Terminal?

Thanks for any help.
Post Reply