• 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: "Mark J. Reed" <email@hidden>
  • Date: Mon, 15 Nov 2010 12:15:10 -0500

On Mon, Nov 15, 2010 at 10:52 AM, Luther Fuller <email@hidden> wrote:
> 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

The ls command doesn't even output the filename in such cases;
non-printable characters just show up as question marks.  So your list
of filenames will include the entry "Icon?", which doesn't exist as a
filename (although if you were using the shell, the wildcard pattern
"Icon?" would match the filename).

Try this:

set AppleScript's text item delimiters to {character id 0}
do shell script "find " & (quoted form of (POSIX path of
sourceFolder)) & " -depth 1 -print0"
set msgList to (text items of the result) as list

leave off the "-depth 1" if you want the contents of all folders and
subfolders under sourceFolder, recursively.









--
Mark J. Reed <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

  • Follow-Ups:
    • Re: Invisible Unix "Icon" File
      • From: Shane Stanley <email@hidden>
References: 
 >Invisible Unix "Icon" File (From: Luther Fuller <email@hidden>)
 >Re: Invisible Unix "Icon" File (From: Michael Wood <email@hidden>)
 >Re: Invisible Unix "Icon" File (From: Luther Fuller <email@hidden>)

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