• 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: Changing File Creation/Modification Dates
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Changing File Creation/Modification Dates


  • Subject: Re: Changing File Creation/Modification Dates
  • From: "Marc K. Myers" <email@hidden>
  • Date: Tue, 13 Feb 2001 00:28:32 -0500
  • Organization: [very little]

> Date: Mon, 12 Feb 2001 17:25:24 -0500 (EST)
> From: Nick Matsakis <email@hidden>
> To: email@hidden
> Subject: Changing File Creation/Modification Dates
>
> I'm working on a script which takes a bunch of my old WordPerfect files
> and converts them to PDF. One of the hitches is that I would like for the
> PDF files to have the same creation/modification times as the original
> files. This leads to two questions:
>
> 1) How can I set a particular files creation/modification date to be
> identical to that of another file?
>
> 2) How can I set that information to arbitrary values?
>
> Incidentally, is there anything at the HFS level that prevents the
> creation date from being later than the modification date? What about at
> the Finder/OS level?

You can't do it with vanilla AS, but you can do it with the Akua Sweets
scripting addition:

set theFile to choose file
set theInfo to (basic info for theFile)
set modification date of theInfo to [optn-L]
date "Thursday, February 1, 2001 12:00:00 AM"
set creation date of theInfo to [optn-L]
date "Thursday, March 1, 2001 12:00:00 AM"
apply catalog info theInfo to theFile

Where you see "[optn-L]", use the AppleScript continuation character,
which you get with that keyboard combination.

To set identical values you would "get basic info" on the source file
and the destination file, copy the two date values to the info record of
the destination file, and "apply catalog info" to the destination file.

Marc K. Myers <email@hidden>
http://AppleScriptsToGo.com
4020 W.220th St.
Fairview Park, OH 44126
(440) 331-1074

[2/13/01 12:25:53 AM]


  • Prev by Date: Re: Count of specific string in Word (was re: Count of Tab characters)
  • Next by Date: Print from Folder Part 2
  • Previous by thread: Changing File Creation/Modification Dates
  • Next by thread: Re: Changing File Creation/Modification Dates
  • Index(es):
    • Date
    • Thread