AppleScript creating new folder name and display differ

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

So when I'm processing a file I create a folder name by using the filename of the file through AppleScript. Folder creation works flawlessly. However at times the folder created does not get processed further.

Code: Select all
make new folder at rootfolderLocation with properties {name:folderName}

ex. foldername = "hello."
all spaces are replaced with ".".. ex "hello world" > "hello.world" ex. "the hello world" > "the.hello.world"

Narrowing down the issue one thing I noticed:
- when you click rule status (eye in the hazel interface under the list of folder on that specific folder
- then select the "i" (on the specific folder)
- look at the detail information
1 the name and full name sometimes are different
2 the name is red (field is highlighted in red) and the full name isn't in red ( what does the red indicator mean?)

troubleshooting:
- went through the entire AppleScript and all steps check out as intended
- one thing I noticed. The difference between the name and full name usually at the "." ex. hello.world = name, hello = full name.
- Searching online sometimes the finder sometimes sees a trailing "." as a package. But this isn't true for all folders.
- if you manually select the folder and remove the trailing "." press enter then add it again then press return the folder name and full name become the same the reprocessing of the folder kicks in.

question:
- how would you create a folder that assures the name and full name are the same?
- what is the red highlighted of the full name mean?

thanks
united
 
Posts: 3
Joined: Wed Mar 14, 2012 3:48 pm

Full name is the name + the extension (the part after the dot) so you'll need to adjust your rules accordingly.

If the rule status shows a field as red, it means that your rule tried to match on that field and it didn't pass the condition.
Mr_Noodle
Site Admin
 
Posts: 7814
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Mr_Noodle wrote:Full name is the name + the extension (the part after the dot) so you'll need to adjust your rules accordingly.

If the rule status shows a field as red, it means that your rule tried to match on that field and it didn't pass the condition.



thanks for the reply. So why would the folder be created with a different full name and name? shouldn't both be the same or is it that since there are "." for spaces that it assumes it's an extension for some folders but not all?
united
 
Posts: 3
Joined: Wed Mar 14, 2012 3:48 pm

If there are any dots, there will be an extension.
Mr_Noodle
Site Admin
 
Posts: 7814
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

I'd say that would be true but there are other folders that have "." for space that are processed just fine while others have the red indicator mentioned above. So the behavior is mostly consistent but not 100%.

ALSO,

somethings i've noticed
- the folders that have an issue end with an "." at the end
- not all folders with a trailing "." have this issue
- the folders with this issue, the Name and Full Name attributes are different. Name has no trailing "." while the Full name does. The full name is the actual name of the folder. (unsure why these are not the same)

So trying to find consistency with the behavior.

what do you suggest? That doesn't involve changing the folder naming convention.
united
 
Posts: 3
Joined: Wed Mar 14, 2012 3:48 pm

As mentioned, the dot, no matter how you interpret is, is interpreted by the system as the start of an extension, namely the last dot and everything after it.

You should provide examples if you find the above doesn't hold true.
Mr_Noodle
Site Admin
 
Posts: 7814
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support