• 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: List of all applications [progress]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: List of all applications [progress]


  • Subject: Re: List of all applications [progress]
  • From: email@hidden
  • Date: Sat, 19 Feb 2011 17:42:09 -0800

I've made some progress and thought I'd post what I had so far for critique:

-------------

set folderToProcess to (choose folder with prompt "Choose folder to scan for apps:")

tell application "Finder"
activate
set nu_file to (choose file name)
set the_file to (open for access nu_file with write permission)

set fileExt to {".app"}
set theTopFolder to (folderToProcess as alias)
write (theTopFolder as text) & " [folder] " to the_file
repeat with EachFile in (get every file of folder (folderToProcess as alias))
try
copy name of EachFile as string to FileName
repeat with ext in fileExt
if FileName ends with ext then
write return & "•" & FileName to the_file starting at eof
end if
end repeat
end try
end repeat
repeat with EachSubDir in (get every folder of folder theTopFolder)
write return & (EachSubDir as text) & " [folder] " to the_file starting at eof
try
repeat with EachFile in (get every file of folder (EachSubDir as alias))
try
copy name of EachFile as string to FileName
--display dialog FileName
repeat with ext in fileExt
if FileName ends with ext then
write return & "••" & FileName to the_file starting at eof
end if
end repeat
end try
end repeat
end try
end repeat
close access theFile
say "Done."
end tell

-------------

The problems I'm having with this script is that it won't go deeper than 1 sub-folder, plus it's listing apps multiple times.  The bullets are there only to see what's going on.

Can someone see what I'm doing wrong?

Thanks,
Marc
 _______________________________________________
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

References: 
 >List of all applications (From: email@hidden)
 >Re: List of all applications (From: Steve Thompson <email@hidden>)

  • Prev by Date: Re: List of all applications
  • Next by Date: Re: List of all applications
  • Previous by thread: Re: List of all applications
  • Next by thread: Re: List of all applications
  • Index(es):
    • Date
    • Thread