MacNN Forums (http://forums.macnn.com/)
-   Classic Macs and Mac OS (http://forums.macnn.com/classic-macs-and-mac-os/)
-   -   Change the creation date? (http://forums.macnn.com/64/classic-macs-and-mac-os/45533/change-the-creation-date/)

 
Speckledstone May 30, 2002 06:32 PM
Change the creation date?
I know its possible to change the modification date of a file with AppleScript. The Finder dictionary lists the creation date as a r/o property. Is there any way to change the creation date of a file?
 
AppleScript May 30, 2002 11:42 PM
Use this:

tell app "Disk Copy"
set creation date of disk image "Path" to date "date"
end tell

This requires Classic's Disk Copy.

(159)
 
Speckledstone May 31, 2002 08:18 AM
I couldn't get your script to work. How do I script this example:

Change the creation date of the SimpleText file "test" (which is on my desktop) to "Thursday, April 1, 1976 12:00:00 AM".
 
AppleScript May 31, 2002 12:14 PM
Use this:

tell app "Disk Copy"
set creation date of disk image "Macintosh HD:Desktop Folder:test" to date "Thursday, April 1, 1976 0:00:00"
end tell

(160)
 
MacMonster May 31, 2002 03:29 PM
Why not use ResEdit?

<small>[ 05-31-2002, 03:31 PM: Message edited by: MacMonster ]</small>
 
Speckledstone Jun 1, 2002 08:29 AM
</font><blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">quote:</font><hr /><font size="1" face="Geneva, Verdana, Arial, sans-serif">Originally posted by AppleScript:
<strong>Use this:

tell app "Disk Copy"
set creation date of disk image "Macintosh HD:Desktop Folder:test" to date "Thursday, April 1, 1976 0:00:00"
end tell

(160)</strong></font><hr /></blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">Thanks AppleScript, it worked fine.
I think I mistyped the file path when I originally tried your script.

Thanks again
 
Cipher13 Jun 1, 2002 09:04 AM
</font><blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">quote:</font><hr /><font size="1" face="Geneva, Verdana, Arial, sans-serif">Originally posted by MacMonster:
<strong>Why not use ResEdit?</strong></font><hr /></blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">ResEdit isn't scriptable... if it was... wow, that'd be some power under the hood.

The initial requirement was for an AppleScript to do this.
 
Speckledstone Jun 1, 2002 10:08 AM
</font><blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">quote:</font><hr /><font size="1" face="Geneva, Verdana, Arial, sans-serif"><strong>Originally posted by Cipher13:
ResEdit isn't scriptable... if it was... wow, that'd be some power under the hood.</strong></font><hr /></blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">Sure would!!!

</font><blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">quote:</font><hr /><font size="1" face="Geneva, Verdana, Arial, sans-serif"><strong>The initial requirement was for an AppleScript to do this.</strong></font><hr /></blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">Actually, I didn't care what app accomplished this - But - Since Applescript showed me how to do this using Applescript and Disk Copy, I can write an Applescript droplet instead of having to:

1. Open the file with ResEdit
2. Hack the creation date
3. Save the file

If I ever have to do this again, it will be a one step process.

Drag and Drop - Thats the way to do it!
 
All times are GMT -4. The time now is 09:12 AM.

Copyright © 2005-2007 MacNN. All rights reserved.
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2016, vBulletin Solutions, Inc.


Content Relevant URLs by vBSEO 3.3.2