• 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: Mod or Creation Date
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mod or Creation Date


  • Subject: Re: Mod or Creation Date
  • From: Walter Ian Kaye <email@hidden>
  • Date: Wed, 21 Jul 2004 00:12:56 -0700

At 03:34p -0300 07/20/2004, Marcus Rodrigues didst inscribe upon an electronic papyrus:

set destino to "Macintosh HD:users:marcus:desktop:Marcus no P3"
set curDate to the current date
tell application "Finder"
launch
set allnames to name of every file of alias destino
set cd to the modification date of allnames
set arquivosdeletados to {}
set AppleScript's text item delimiters to ", "
repeat with aname in allnames
set aname to (aname as string)
try
if creation date of file aname < curDate - 7 * days then
delete file aname
set arquivosdeletados to arquivosdeletados & aname
end if
end try
end repeat

end tell
set tuf to the items of arquivosdeletados as string
allnames
cd


It gives me an error saying it can't get the dates of files.... Any
help???

You cannot get the date of the name of a file. Names do not have dates. You need to operate on the files themselves.


-boo
who wouldn't mind a date :)
_______________________________________________
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: Mod or Creation Date
      • From: Michelle Steiner <email@hidden>
References: 
 >Mod or Creation Date (From: Marcus Rodrigues <email@hidden>)

  • Prev by Date: Re: Problem getting position of desktop items
  • Next by Date: Re: Newbie with very simple question
  • Previous by thread: Mod or Creation Date
  • Next by thread: Re: Mod or Creation Date
  • Index(es):
    • Date
    • Thread