Monday, September 30, 2013

Get log file from latest folder through AppleScript !

#This AppleScript is for get latest log file generated during automatic build server.

set sourceFolder to "Users:....:.....:targetFolder"

property the_path : "/Users/..../.../targetFolder"
set theFolder to (POSIX file the_pathas alias

tell application "Finder"
set itemGroup to sort (get every folder of theFolderby creation date
set LatestFolder to (get first item of itemGroup)
set LatestFolderName to LatestFolder's name
end tell

set latestFilePath to "/Users/..../..../targetFolder/" & LatestFolderName & "/log"


#This AppleScript is for get latest folder and it's name.


set sourceFolder to "Users:....:.....:targetFolder"

property the_path : "/Users/..../.../targetFolder"
set theFolder to (POSIX file the_pathas alias

tell application "Finder"
set itemGroup to sort (get every folder of theFolderby creation date
set LatestFolder to (get first item of itemGroup)
set LatestFolderName to LatestFolder's name
end tell


3 comments:

  1. Nice Post ..!! I really i like the way of your writing this post. You have shared a very interesting and informative post about Mobile platform .. keep Updating..!!
    -----------------------------------------------------------------------------
    Php Development Services India, && Hire Titanium Developer

    ReplyDelete
  2. This comment has been removed by the author.

    ReplyDelete