• 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: (resend)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: (resend)


  • Subject: Re: (resend)
  • From: Skeeve <email@hidden>
  • Date: Sat, 27 Mar 2010 08:30:41 +0100

Alex Zavatone schrieb:

ls -1dt */
But trying that in Applescript, it doesn't work as expected, set myShellString to "ls -1dt " & (quoted form of POSIX path of myFolder) & "*/"
set myShellResults to do shell script myShellString
This gives this output:
/Optimized PNG/Button bar in layers/
/Optimized PNG/prog info no thumbs/
...
While what is desired is:
Button bar in layers/
prog info no thumbs/
...
Do you ever think about what you're doing? If the output is different, the reason is, that you are doing different thnigs. In Terminal you do:

   cd 'Optimized PNG'

   ls -1dt *

And that gives you what you want.

I don't understand why the heck you  don't do the same in Applescript!

	set myShellString to "cd " & (quoted form of POSIX path of myFolder) & " ; ls -1dt *"

	set myShellResults to do shell script myShellString

_______________________________________________
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: (resend)
      • From: Alex Zavatone <email@hidden>
References: 
 >Re: (resend) (From: Shane Stanley <email@hidden>)
 >Re: (resend) (From: Alex Zavatone <email@hidden>)
 >Re: (resend) (From: "Mark J. Reed" <email@hidden>)
 >Re: (resend) (From: Alex Zavatone <email@hidden>)

  • Prev by Date: Some Handy Unix Commands
  • Next by Date: Re: (resend)
  • Previous by thread: Re: (resend)
  • Next by thread: Re: (resend)
  • Index(es):
    • Date
    • Thread