[comp.sys.amiga] Setting time and date of a file

cs@mdbs.UUCP (10/07/87)

I am trying to copy a file from a remote machine to my Amiga preserving
the modification time of the file.  My question is how to set the time
of the Amiga file to the time of the remote file.  Under UNIX, utime()
usually accomplishes this.  Is there a similar function under AmigaDOS?
_____________________________________________________________________  _
  Curtis Smith            ...!{decvax,ucbvax,ihnp4}!pur-ee!mdbs!cs    / |
  Micro Data Base Systems, Inc.   PO Box 248   Lafayette IN, 47902   (oo\
                                                                      \  \
  "If I am elected, the concrete barriers around the WHITE HOUSE     _/\_|
  will be replaced by tasteful foam replicas of ANN MARGARET!"         _/

bryce@hoser.berkeley.edu (Bryce Nesbitt) (10/13/87)

Curtis Smith writes:
>
>I am trying to copy a file from a remote machine to my Amiga preserving
>the modification time of the file.  My question is how to set the time
>of the Amiga file to the time of the remote file.  Under UNIX, utime()
>usually accomplishes this.  Is there a similar function under AmigaDOS?

The function is an AmigaDOS packet:

ACTION_SET_DATE=34L

Sent it to the message port returned by DeviceProc(filename)
Open your libraries with 33L since this is a new V1.2 function

arg0	= NULL
arg1	= lock on parent of file
arg2	= BPTR (yick!) to BSTR of filename
arg3	= APTR to a DateStampt structure


[ You will need to know how to send DOS packets to use this information ]


A user can set the time of a file with "SetDate" form the A500/A2000
Workbench disk (About $650, includes A500).  This has a "defect" in
that you _must_ supply a time and can't just "touch" the file with the
current date and time.

 
|\ /|  . Ack! (NAK, ENQ, SYN)
{o O} . 
 (") 	bryce@hoser.berkeley.EDU -or- ucbvax!hoser!bryce
  U	"...this will shoot the lips off a cockroch."

carolyn@cbmvax.UUCP (Carolyn Scheppner CATS) (10/16/87)

In article <4312@zen.berkeley.edu> bryce@hoser.berkeley.edu (Bryce Nesbitt) writes:
>
>A user can set the time of a file with "SetDate" form the A500/A2000
>Workbench disk (About $650, includes A500)...

Users who are low on cash can just use the identical 1.2 A1000 Workbench
SetDate command.
-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Carolyn Scheppner -- CATS   >>Commodore Amiga Technical Support<<
                     UUCP  ...{allegra,ihnp4,rutgers}!cbmvax!carolyn 
                     PHONE 215-431-9180
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=