Path: utzoo!utgpu!water!watmath!clyde!rutgers!cmcl2!brl-adm!umd5!ames!pasteur!ucbvax!UOFT02.BITNET!ERIC From: ERIC@UOFT02.BITNET (Eric) Newsgroups: comp.os.vms Subject: Re: Printing file age via DCL Message-ID: <8802201628.AA18272@ucbvax.Berkeley.EDU> Date: 15 Feb 88 19:01:00 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 23 In-Reply-To: your letter rec'd 14-FEB-1988 14:38 From: IN%"INFO-VAX@KL.SRI.COM" 14-FEB-1988 14:38 To: Eric Rostetter Subj: Printing file age via DCL > I have a simple problem nobody here seems to be able to solve (we're fairly > new to VMS) which is, how to display a file's age via DCL. I can get > the revision date and time via F$FILE_ATTRIBUTES, but how do I subtract this > (which is a character string) from the current date and time (another string) > and end up with something meaningful (such as DELTA time format)? I can't > see how to do it via F$CVTIME though I tried F$CVTIME(-RDT) and all it gave > me was midnight of today. I can't believe this would be difficult in DCL > but it sure isn't obvious to me! The following is not what you asked for, but maybe it will help you anyway. It types a file if the file has been changed within the last three days... To change the period of time, simply change the constant date/time (delta format) in the first line (currently 03-00:00). Maybe you can modify this to do what you want... Then again, maybe not... Eric Rostetter Eric @ uoft02.bitnet