Re: Edit the date Modified field
Re: Edit the date Modified field
- Subject: Re: Edit the date Modified field
- From: Mark Gibson <email@hidden>
- Date: Sun, 21 Oct 2001 07:13:09 +1000
On 10/20/01 9:51 AM, email@hidden <email@hidden> wrote:
Thanks. The problem is that while the year is wrong, the day and month is
correct. I need to be able to convert 19/10/1963 to 19/10/2001 and 5/6/63
to 5/6/01 not just convert everything with a 1963 date to 19/10/01.
Okay, Mark... So, you're right: there's no off-the-shelf solution. I'm
sorry I can't help you: I know how to get the dates but I don't know how
to set them. Better ask the list again!
I missed the earlier part of this discussion, but if the problem is to
change the year of modification date of a file to the current year, this
will do it.
tell application "Finder"
set foo to item 1 of the selection
set the modDate to the modification date of foo
set the year of the modDate to 2001
set the modification date of foo to the modDate
end tell
--Michelle
----------------------------------------------------------------------
| Michelle Steiner | We're not human beings having a spiritual |
| | experience. We're spiritual beings |
| email@hidden | having a human experience. |
----------------------------------------------------------------------
Thanks for the help to date, three continents and on a Sunday morning
(at least here) too!
The script above works fine if I highlight the file and run it (no
doubt I could save it as an app and drop files on it too).
The problem I face is working my way through a server volume with
many folder levels and many dates to reset. I'm happy to run the app
several times but I need some sort of IF statement that says "If year
of date = 1963 then run" and the ability to dig down into the folder
structure.
The current script is fine for a file but if I select more than one
it only changes one file.
Any ideas?
Mark
--
Windows 95 /Win' dz/: n., 32-bit extensions and a graphical shell
for a 16-bit patch to an 8-bit operating system originally coded for
a 4-bit microprocessor, written by a 2-bit company, that can't stand
1 bit of competition.