• 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
Shell script to get a list of all subfolders inside a folder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Shell script to get a list of all subfolders inside a folder


  • Subject: Shell script to get a list of all subfolders inside a folder
  • From: Bert Groeneveld <email@hidden>
  • Date: Mon, 12 Oct 2015 15:42:00 +0200

Hi, I need a list of all subfolders (HFS path, not just the name) that are inside a given folder.
Can anyone help me with a shell script that does exactly the same as following Finder statement, which is very very slow (execution time 90 seconds for 2265 subfolders):

set myfolder to alias “Macintosh HD:Users:bertus:Desktop:example folder"

tell application "Finder"
set mySubFolders to every folder of entire contents of myfolder
end tell

Hope someone can post example code. That would really help me. Unfortunately I am unable to figure this out myself.

Thanks in advance,
Bert.

 _______________________________________________
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: Shell script to get a list of all subfolders inside a folder
      • From: Christopher Stone <email@hidden>
    • Re: Shell script to get a list of all subfolders inside a folder
      • From: Axel Luttgens <email@hidden>
  • Prev by Date: Re: script differences ?
  • Next by Date: Re: Shell script to get a list of all subfolders inside a folder
  • Previous by thread: Rép : script differences ?
  • Next by thread: Re: Shell script to get a list of all subfolders inside a folder
  • Index(es):
    • Date
    • Thread