Re: Mod or Creation Date
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.