• 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
do shell script & freeeeeze!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

do shell script & freeeeeze!


  • Subject: do shell script & freeeeeze!
  • From: julifos <email@hidden>
  • Date: Tue, 25 Feb 2003 22:23:11 +0100

Hi all!

I was looking a one-line script to check whether an item is a file or a
folder, then (if folder) list its contents.

####################################

set I_dont_know_if_is_folder to posix path of alias "HD:I am a file"

do shell script "cd '" & I_dont_know_if_is_folder & "'; ls -R"

####################################

I thought the "cd" command would throw an error if the item was not a
directory, but it simply stops responding until force-quit.

JJ
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: do shell script & freeeeeze!
      • From: Nigel Smith <email@hidden>
  • Prev by Date: Odd and sort of off topic
  • Next by Date: Suggestions for speeding up code
  • Previous by thread: RE: Odd and sort of off topic
  • Next by thread: Re: do shell script & freeeeeze!
  • Index(es):
    • Date
    • Thread