Hi Simon,

Sorry for the late reply and thank you so much for this suggestion which I’ve 
tried and the sequence executes successfully updating one of the folder paths. 
Unfortunately due to the tangled mess my daughter got into in creating the 
video in the first place she ended up with 17 different folder paths all 
pointing to different directories. My aim (since August!) has been trying to 
redirect all of these folders to a single path (‘E\Photos’) where all photos 
and videos are now stored.

Since testing your suggestion I’ve been reading the SQL syntax and examples to 
try to work out how to modify or extend your sequence below to change the 
remaining 16 Folder Paths however when I try to change each one in turn I 
receive the following error:

UNIQUE constraint failed: Folder.Folder_Path: UPDATE folder
SET Folder_Path = 'E:\Photos'
WHERE Folder_Path = 'C:\Users\carlo\Pictures' AND folder_Id = 1

Kind regards,
Carlo.

From: Simon Slavin<mailto:slav...@bigfraud.org>
Sent: 30 November 2018 14:43
Subject: Re: [sqlite] Updating Folder_Path in Windows 10 Photos App

On 29 Nov 2018, at 7:32pm, Carlo capaldo <carlocapa...@hotmail.com> wrote:

> select folder.Folder_Path,
> replace(Folder_Path,'C:\Users\carlo\Pictures','E:\Photos')
> from Folder
> where folder.Folder_Id = 1
>
> Could someone kindly educate me on how to update the folder references?

My guess is that you actually want

UPDATE folder
    SET Folder_Path = 'E:\Photos'
    WHERE Folder_Path = 'C:\Users\carlo\Pictures' AND folder_Id = 1

Please take a backup copy of your database file before trying this.

Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to