Re: Creating unique numerical representation of file path?
Re: Creating unique numerical representation of file path?
- Subject: Re: Creating unique numerical representation of file path?
- From: Andrei Tchijov <email@hidden>
- Date: Sat, 13 Oct 2007 01:55:29 -0400
Try digests (for example MD5). You can use command line:
echo "/Some/Very/Long/POSIX/Path/" | md5
1edc59060c56d2195727d1b85f10bdac
On Oct 13, 2007, at 1:33 AM, Richard Rönnbäck wrote:
I am working on a project where I prepare text files for import into
FileMaker Pro. The text files contain various fields but the idea
is to use
the file path act as the matching field on import.
The problem is that FileMaker's matching mechanism has a limit of
something
like 120 characters, which means that file paths longer than that are
inaccurately matched and imported into the wrong records, and even
into
multiple records
I know how to work around this issue by using scripts and loops and
external
comparisons, but the problem is performance, the import files may
contain up
to 50,000 records and may be imported up to 50 times a day.
A second related consequence of FM's limit is when creating
relations, so I
would need such a short representation for that reason too.
So now I wonder if it would be possible to create a unique numerical
representation of a file path, that would be shorter than the file
path
itself, but as my mathematical skills are far to basic I am hoping
to get
input from someone with better knowledge of math than me.
So, how can I turn something like this:
/Some/Very/Long/POSIX/Path/
into a shorter number like this
1234
And be absolutely sure that no other path/sequence of characters
could get
the same number?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (applescript-
email@hidden)
Help/Unsubscribe/Update your Subscription:
40tchijov.com
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden