Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!ut-sally!husc6!husc7!hadeishi From: hadeishi@husc7.HARVARD.EDU (Mitsuharu Hadeishi) Newsgroups: comp.sys.amiga Subject: Re: Setting File Dates Message-ID: <1656@husc6.UUCP> Date: Mon, 13-Apr-87 13:57:33 EST Article-I.D.: husc6.1656 Posted: Mon Apr 13 13:57:33 1987 Date-Received: Sat, 18-Apr-87 18:51:04 EST References: <6597@allegra.UUCP> Sender: news@husc6.UUCP Reply-To: hadeishi@husc7.UUCP (Mitsuharu Hadeishi) Organization: Harvard Univ. Science Center Lines: 34 In <6597@allegra.UUCP> dsf@allegra.UUCP (David Fox) writes: >I am sure I saw something about this somewhere, but I can't find it >now. The question is, how can I set the modification date on a file? >I need this in order to copy directories from floppy to vd0: and >not have make think everything is messed up, and so I only have to copy >the files that changed back onto the floppies. I plan to add the >-p (preserve date) flag to the copy command in the shell. A few ways of doing it: the easiest is to use the SetFileDate action, a new AmigaDOS packet action. It's documented in the 1.2 AmigaDOS autodocs, I think. At least it's in the 1.2 changes section of the 1.2 Gamma 1 documentation. But a quick and dirty way to do this, assuming your files are up to date to start with, is to do a copy df1:source/Makefile vd0:source copy df1:source/#?.(c|h) vd0:source copy df1:source/#?.o vd0:source This is what I usually do (since I almost always terminate a programming session by recompiling my code to make sure it at least compiles properly, since I don't like to take off from the middle of an editing session.) And, of course, in the Makefile, after each compile, I have a copy sourcefile.h vd0:source copy sourcefile.c vd0:source copy sourcefile.o vd0:source to automagically keep my floppy record updated. (I typically have a header file for most of my source files for exported variables.) -Mitsu