You can use AppleScript to look up a record by path (library record whose file is "…") and to get the record link or GUID.
library record whose file is "…"