Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!watdragon!tiger!jafischer From: jafischer@tiger.UUCP Newsgroups: comp.sys.atari.st Subject: CT - Copy with Timestamp Message-ID: <3896@watdragon.waterloo.edu> Date: Thu, 22-Oct-87 02:10:42 EDT Article-I.D.: watdrago.3896 Posted: Thu Oct 22 02:10:42 1987 Date-Received: Sat, 24-Oct-87 11:44:13 EDT Sender: daemon@watdragon.waterloo.edu Reply-To: jafischer@tiger.waterloo.edu (Jonathan A. Fischer) Organization: U. of Waterloo, Ontario Lines: 219 [] First off, this is no major, change-the-way-you-use-your-ST- forever-type program. It's a replacement for the 'cp' command of your favourite command shell. I call it 'ct,' for 'copy with timestamp.' The destination files will end up with the same timestamp as the source files. [ NB: The only time I don't do this is when you're just copying one file to another, since this may be construed as creating a new file. (I couldn't really decide on this, but left it that way. It can be changed easily enough in the source.)] This has been discussed here before, some time ago. My view, concisely: I'm forever reorganizing my disks by copying files to and fro; having the GEM desktop screw up the timestamps (this is definitely one thing MS DOS does right) can get quite frustrating. I want to know the date that the file was last _modified_, not just copied from here to there. More importantly, though (and the main reason I wrote ct), I do all of my (meagre) developing on a RAMdisk, and I want the timestamps maintained when I copy the source code to the RAMdisk. Otherwise, Make gets utterly confused. I also intended to write add a 'backup' capability, which would take two directories as its arguments, and copy only those files which either (a) didn't exist in the destination directory, or (b) had a timestamp more recent than the corresponding file in the destination directory. Never got around to it, and I haven't really done any development since school started. Feel free to modify this code (like, no copyrights). Finally, one interesting note: I use Cconws() exclusively. To see just how much good it was doing me, I did a #define Cconws printf at the beginning. After stripping the symbols, the executable with printf was about 8 1/2 K, and the size with Cconws is only 3 1/2K. With a small program like this, I'd say it's definitely worthwhile to avoid printf and the like. BTW, I don't exactly remember -- does Gulam update the timestamp in this manner? I munged my copy. -- Not really necesary to cut here, since uudecode will ignore the above -- table !"#$%&'()*+,-./0123456789:;<=>? @ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_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[ZW_>Q$XP 0Bp ML($#($$ "4# 1;@@?&MCWO3LW[YOG> QHW@+ 40X?4PL %4,"!@\L> 3 o F 02 =P$0 !DR>!00 -0& ^QD!=0&"0I@>0L! ]8! T!"1$ &@"!n m end -- - Jonathan A. Fischer jafischer@lion.waterloo.edu ...{ihnp4,allegra,decvax,utzoo,utcsri}!watmath!watdragon!watlion!jafischer