• 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: Edit the date Modified field
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


References: 
 >Re: Edit the date Modified field (From: Michelle Steiner <email@hidden>)

  • Prev by Date: Re: hash arrays and other mysteries
  • Next by Date: Re: Edit the date Modified field
  • Previous by thread: Re: Edit the date Modified field
  • Next by thread: Re: Edit the date Modified field
  • Index(es):
    • Date
    • Thread