HP OpenVMS Systems

ask the wizard
Content starts here

DCL Date Specifications?

» close window

The Question is:

I have a requirement of deleting files more than 7 days old. For this I am
 using /before option of the delete command. But how do I give the parameter
 (current day - 7 ) to the /before switch?

The Answer is :

  DCL permits specifications of absolute, relative (also called delta)
  and combination dates.  Please see the help text -- please see HELP
  DCL DATE_TIME on V7.2-1 -- and please see the OpenVMS User's Guide
  for details on this.
  To delete all files older that 7 days, use: $DELETE/BEFORE="-7-"
  And when trying new DELETE command switch combinations, please practice
  using the switches on the DIRECTORY command first, to ensure that the
  command will select (only) the intended files.

answer written or last revised on ( 16-NOV-2000 )

» close window