From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f7344,bd4330eaa1f685a6 X-Google-Attributes: gidf7344,public X-Google-Thread: 1164f8,bd4330eaa1f685a6 X-Google-Attributes: gid1164f8,public From: ddellutr@MCS.COM (Dale Dellutri) Subject: Re: "NOPE" resurrected. Displays PURGE info, without DOING the purge... Date: 1997/05/12 Message-ID: <5l7epp$abi$1@Mars.mcs.net>#1/1 X-Deja-AN: 241088691 Distribution: world References: <1997May9.152046.1@cpg.mcw.edu> <5l28p1$110$1@Mars.mcs.net> <10MAY199714160414@gerg.tamu.edu> Organization: Dale at MCSNet Newsgroups: comp.os.vms,comp.sys.dec In comp.os.vms Carl Perkins wrote: > In article <5l28p1$110$1@Mars.mcs.net>, ddellutr@MCS.COM (Dale Dellutri) writes... > }In comp.os.vms Kent C Brodie wrote: > }> I recently resurrected the "NOPE" utility. A cute, but VERY handy > }> system manager tool. Basically, it displays files that _WOULD_ be purged > }> *IF* you did a purge (and it lets you use wild cards, filespecs, etc). > } > }Won't this (not completely tested) com file do what you want? [... old version of com file deleted ... ] > At lseast, I expect not. I don't actually have NOPE, but I see problems with > what you have there. > What happens if I want to keep 2 versions of the files, I.E. find out what > files would be deleted if I did a PURGE/KEEP=2? Or perhaps a > PURGE/BEFORE=YESTERDAY? Or both via PURGE/KEEP=2/BEFORE=YESTERDAY? > I expect that NOPE does those cases. If it doesn't, it ought to. > The order that files appear on your list will also be different for a lot of > those cases that work for both. Say your directory has these files in it: [... some examples deleted ...] > --- Carl I can't fix the order of the listing, but this new version covers both the keep level and before= requirements. I dropped the ability to write to a file in the com file, just assign sys$output to a file and deassign it after the com file runs. To get the listing of files to be deleted if you say PURGE/KEEP=2/BEFORE=YESTERDAY, just say @NOPE *.* 2 "/BEFORE=YESTERDAY" DCL is a surprisingly powerful language. $! NOPE.COM - Display files that would be purged if you did $! a PURGE/LOG, but do not delete files $! Dale Dellutri 1997-05-10 $! Version 1.2 $ say = "WRITE SYS$OUTPUT" $ if p1 .eqs. "" $ then $ say "Usage:" $ say " @NOPE " $ say " P1 = filespec (must not contain version number)" $ say " P2 = keep level (default is 1) $ say " P3 = qualifiers for DIR command (do not use /LOG)" $ exit %X10000002 $ endif $ if p2 .eqs. "" $ then $ i = 1 $ else $ i = 'p2' $ endif $ on warning then exit $dir_loop: $ dir'p3' 'p1';-'i' $ i = i + 1 $ goto dir_loop -- Dale Dellutri