Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!bloom-beacon!oberon!cit-vax!ucla-cs!zen!bryce From: bryce@hoser.berkeley.edu (Bryce Nesbitt) Newsgroups: comp.sys.amiga Subject: Re: Setting time and date of a file Message-ID: <4312@zen.berkeley.edu> Date: Tue, 13-Oct-87 04:00:28 EDT Article-I.D.: zen.4312 Posted: Tue Oct 13 04:00:28 1987 Date-Received: Wed, 14-Oct-87 06:45:42 EDT Sender: news@zen.berkeley.edu Lines: 34 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."