• 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: finding newest file in a folder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: finding newest file in a folder


  • Subject: Re: finding newest file in a folder
  • From: steve harley <email@hidden>
  • Date: Mon, 15 Mar 2004 17:10:54 -0700

on 14 Mar 2004, at 2:04 PM, Christopher Nebel wrote:
set k to paragraph 1 of (do shell script "ls -Ft " & quoted form of d & " | grep -v '/$')

-F adds "/" to directories, but also adds characters to names of executables, symlinks, etc.. -p is cleaner.. and why not just let the shell finish it off:

set k to do shell script "ls -pt " & quoted form of d & " | grep -v /$ | head -1"
_______________________________________________
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: finding newest file in a folder
      • From: Christopher Nebel <email@hidden>
References: 
 >finding newest file in a folder (From: John Cochrane <email@hidden>)
 >Re: finding newest file in a folder (From: Deivy Petrescu <email@hidden>)
 >Re: finding newest file in a folder (From: Christopher Nebel <email@hidden>)

  • Prev by Date: Re: Another stupid question
  • Next by Date: Re: How to detect a file has resource fork, or not?
  • Previous by thread: Re: finding newest file in a folder
  • Next by thread: Re: finding newest file in a folder
  • Index(es):
    • Date
    • Thread