On May 22, 2014, at 1:14 PM, Luther Fuller wrote: I just started up in 10.9.3 Mavericks (English) and exercised my script. I got the same result ... leading zeros anywhere within a file name are equivalent to "0".
Also, a second thought about this problem: This could be a "feature" designed to facilitate naive users who may not understand details of file naming. (I hope not!) If true, then it should be documented somewhere.
Has anyone seen it documented? And, if so, then where?
Hi Luther,
From that, it's clear that any portion of a file name that can be interpreted as a number, for purposes of sorting, will be. And, of course, leading zeros have no significance in a numeric sort.
My semi-educated guess is that, since this is how Finder's internals work, the numeric-parsing mechanism is inadvertently affecting AS commands. Think about it—in the Finder's UI, you either see a file or you don't. The fact that Finder keeps two version of each file name—the actual one and a numerically-parsed one—goes unnoticed. A script, OTOH, requires access to the actual name, but the Finder only seems to provide the parsed one.
It's interesting that the Finder's scripting dictionary includes the displayed name property of a file, which the dictionary describes as "the user-visible name of the item". But, of course, it suffers from the same problem:
name of files of folder "MacHD:Users:stanc:Desktop:Test:" whose displayed name is "Test_1.txt" --> {"Test_00001.txt", "Test_0001.txt", "Test_001.txt", "Test_01.txt", "Test_1.txt"} files of folder "MacHD:Users:stanc:Desktop:Test:" whose displayed name is "Test_1.txt" --> {document file "Test_00001.txt" of folder "Test" of folder "Desktop" of folder "stanc" of folder "Users" of startup disk of application "Finder", etc.}
I'm running Mac OS X Lion, BTW.
Stan C.
|