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

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


  • Subject: Re: Shell script to get a list of all subfolders inside a folder
  • From: Shane Stanley <email@hidden>
  • Date: Tue, 13 Oct 2015 21:34:37 +1100

On 13 Oct 2015, at 9:20 PM, Christopher Stone <email@hidden> wrote:

That's curious.

On my system I made a specific folder invisible and ran the script from ASObjC Explorer 4.

The invisible folder was NOT shown.

I used ASObjC Explorer 4, because the script choked Script Debugger and Script Editor – although it ran alright from Smile.

Just so we're on the same page, this is the script:

set myFolder to (path to home folder)
list files myFolder conforming to {"public.folder"} without invisibles

And it would choke SE and SD here too, so I also used Explorer (for lurkers: it lets you limit how many items in a list are logged, hence it doesn't choke in this case).

So here's the start of my log:

0008.958 tell current application to list files alias "Macintosh HD:Users:shane:" conforming to {"public.folder"} without invisibles
  --> {file "Macintosh HD:Users:shane:.adobe:", file "Macintosh HD:Users:shane:.android:", file "Macintosh HD:Users:shane:.bash_sessions:", file "Macintosh HD:Users:shane:.CloudStation:", file "Macintosh HD:Users:shane:.CloudStation:db:", file "Macintosh HD:Users:shane:.CloudStation:log:", file "Macintosh HD:Users:shane:.config:"...

All invisible folders.

Hang on -- I wonder if list files is taking only the old Finder invisible flag into account. Could that explain what you see?

-- 
Shane Stanley <email@hidden>
<www.macosxautomation.com/applescript/apps/>

 _______________________________________________
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>
References: 
 >Shell script to get a list of all subfolders inside a folder (From: Bert Groeneveld <email@hidden>)
 >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: Bert Groeneveld <email@hidden>)
 >Re: Shell script to get a list of all subfolders inside a folder (From: Shane Stanley <email@hidden>)
 >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: Shane Stanley <email@hidden>)
 >Re: Shell script to get a list of all subfolders inside a folder (From: Christopher Stone <email@hidden>)

  • Prev by Date: Re: Shell script to get a list of all subfolders inside a folder
  • Next by Date: Re: Shell script to get a list of all subfolders inside a folder
  • Previous by thread: Re: Shell script to get a list of all subfolders inside a folder
  • Next by thread: Re: Shell script to get a list of all subfolders inside a folder
  • Index(es):
    • Date
    • Thread