Skip navigation
Currently Being Moderated

Relink Already Renamed files

Aug 20, 2012 1:26 PM

Yep, I'm sure this has been asked before, but is there a script out there which enables batch relinking files which contain the same data but have been renamed? (Win7, ID CS5)

 

Thanks in advance,

 

Andy

 
Replies
  • Currently Being Moderated
    Aug 21, 2012 10:59 AM   in reply to Andymc7

    Where and how were these files re-named?

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 24, 2012 7:30 AM   in reply to Andymc7

    Possible maybe… depends mostly upon your linked files… ID will store info about your links in it's XMP… each link should have instance ID and document ID you could use the external XMP library and match these up… Well that would be the principle… In practice Im rubbish at XMP

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 24, 2012 7:51 AM   in reply to Andymc7

    It may also be possible to just do some comparison… This may be enough I don't know?

     

    var doc = app.activeDocument;

    $.writeln( doc.links.firstItem().linkXmp.creationDate );

    $.writeln( doc.links.firstItem().linkXmp.modificationDate );

    $.writeln( doc.links.firstItem().linkXmp.creator );

    $.writeln( doc.links.firstItem().linkXmp.format );

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 24, 2012 9:36 AM   in reply to Muppet Mark

    Hi,

     

    never tried this before and I'm on a mac for the next weeks, but what about the console?

    Say you've got both files, the original and the renamed one.

    In AppleScript you can implement Unix-Commands like 'diff' or 'cmp' which compare two files, so if identical ... relink

     

    There should be a simular DOS-command too. It's called 'comp' I think. Implementation in JavaScript is not as good, but a tmp-bat-file at least can be written and executed ...

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 24, 2012 9:44 AM   in reply to -hans-

    I don't think there are 2 files to compaire? Just one that has been renamed and in doing so is a broken link…

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 24, 2012 10:14 AM   in reply to Andymc7

    **** ,

     

    just wrote those lines which compares two existing files and relinks if equal ...

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 24, 2012 11:15 AM   in reply to Andymc7

    Well I was thinking you could match up some date objects but with a quick test I can't get it to play ball… What I can't work out yet is…

     

    A link odject linkXmp.creationDate == file object.created

     

    they report different but I don't know why… hum?

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 12, 2012 11:43 AM   in reply to Andymc7

    Hi,

     

    what's your handling like¿ Do you choose them by visual control?

    This can probably not be done by script ...

     

    Write a list:

    oldName <>newName then it'll be done easy.

     

    Hans-Gerd Claßen

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points