change date & time

Hi All
Can I change date & time of any file. Suppose I have a document created on 12/05/05 at 20:40, now I want to change it’s date 04/06/05 at 08:40. Can I do it.

Please help me.

Regards,
Rajeev

Hi All

One of my friend suggested me:

set theFile to choose file
do shell script "/usr/bin/touch -t 200504060840.00 " & quoted form of POSIX path of theFile
return info for theFile

But it gives the following error

sh: line 1:/user/bin/touch: No such file or directory

please suggest me, how I can handle this situation.
Regards,
Rajeev

I don’t think you need the “/usr/bin/”. Also, it looks as though your friend is thinking in US short-date format whereas you probably are not. This resets the creation date to 4th June 2005 at 08:40:00:

set theFile to (choose file)
do shell script "touch -t 200506040840.00 " & quoted form of POSIX path of theFile
-- return (info for theFile)