Not signed in (Sign In)

Vanilla 1.1.4 is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthorasplundj
    • CommentTimeJun 29th 2008
     
    I have all my pdfs in a directory and I've made links to each pdf. I will need to move them to another directory now. Is it possible to batch edit the links ? They will have the same name but will be in a new directory


    thanks
    Johan
    • CommentAuthorTjowens
    • CommentTimeJun 30th 2008
     
    There is currently no way to batch edit the location of attachment files. There have been several requests for ways to manage attached files in this kind of fashion but I don't think there is any proposed resolution.
    • CommentAuthorasplundj
    • CommentTimeJul 1st 2008
     
    I know, it's not recommended but would this be possible with a third-party sqlite client?
  1.  
    I know, it's not recommended but would this be possible with a third-party sqlite client?

    On Windows or Linux, yes, you could do it with the SQLite REPLACE() function. On OS X, no, not the way linked file paths are currently stored, though we'll likely be changing that.
    • CommentAuthorasplundj
    • CommentTimeJul 2nd 2008
     
    ok thanks for the help.

    Any suggestions on the exact command?


    Johan
  2.  
    Any suggestions on the exact command?

    Something like this should work:

    UPDATE itemAttachments SET path=REPLACE(path, 'C:\Path\To\Old\Dir', 'C:\Path\To\New\Dir');

    You'd want to make a backup copy first, of course, and I'd also recommend doing a SELECT first to make sure you'll be getting what you expect:

    SELECT path AS oldPath, REPLACE(path, 'C:\Path\To\Old\Dir', 'C:\Path\To\New\Dir') AS newPath FROM itemAttachments;