• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Invisible Unix "Icon" File
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Invisible Unix "Icon" File


  • Subject: Re: Invisible Unix "Icon" File
  • From: Luther Fuller <email@hidden>
  • Date: Mon, 15 Nov 2010 09:52:44 -0600

Followup. On 4 Nov 2010, I asked ...

Does anyone know any details about a file that's ...
1. Invisible
2. Named "Icon"
3. Kind is either 'Finder.app Document' or 'Unix Executable File'.

Your comments were helpful and I had intended to immediately chase down a bug in my script that caused an error when it encountered these Icon files, but my Mac mini decided to have problems at that time. A week and a new logic board later I have found the cause of my problem.

My script was getting a list of files in a folder using ...

set AppleScript's text item delimiters to {return}
do shell script "ls -tr " & (quoted form of (POSIX path of sourceFolder))
set msgList to (text items of the result) as list

If the folder contained an invisible file named "Icon" & return, then the name "Icon" appeared in msgList. There is no such file, so I got an error later in the script. I had originally obtained msgList via the Finder, but replaced this code with the code above when the Finder paused way too long while returning the list of items.

Fixing the problem with the "Icon" file required that I return to using the Finder.
Now I'm telling the Finder to ...

set msgList to (reverse of (sort items of sourceFolder by modification date))
repeat with i from 1 to (count items of msgList)
set item i of msgList to (item i of msgList) as alias
end repeat

It seems to be working without the long pause and, of course, it doesn't see the invisible icon file.
I ought to be able to shorten the code above to ...

set msgList to (reverse of (sort items of sourceFolder by modification date)) as alias list

but the Finder seems not to understand alias list despite its dictionary.

 _______________________________________________
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

  • Follow-Ups:
    • Re: Invisible Unix "Icon" File
      • From: Axel Luttgens <email@hidden>
    • Re: Invisible Unix "Icon" File
      • From: "Mark J. Reed" <email@hidden>
References: 
 >Invisible Unix "Icon" File (From: Luther Fuller <email@hidden>)
 >Re: Invisible Unix "Icon" File (From: Michael Wood <email@hidden>)

  • Prev by Date: Re: Changing voice in VoiceOver
  • Next by Date: Re: Invisible Unix "Icon" File
  • Previous by thread: Re: Invisible Unix "Icon" File
  • Next by thread: Re: Invisible Unix "Icon" File
  • Index(es):
    • Date
    • Thread