; FILEZAP ;--------------------------------------------------------------- ;! Delete an external file ;# VERB GENERAL FITS ;----------------------------------------------------------------------- ;; Copyright (C) 2009 ;; Associated Universities, Inc. Washington DC, USA. ;; ;; This program is free software; you can redistribute it and/or ;; modify it under the terms of the GNU General Public License as ;; published by the Free Software Foundation; either version 2 of ;; the License, or (at your option) any later version. ;; ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; ;; You should have received a copy of the GNU General Public ;; License along with this program; if not, write to the Free ;; Software Foundation, Inc., 675 Massachusetts Ave, Cambridge, ;; MA 02139, USA. ;; ;; Correspondence concerning AIPS should be addressed as follows: ;; Internet email: aipsmail@nrao.edu. ;; Postal address: AIPS Project Office ;; National Radio Astronomy Observatory ;; 520 Edgemont Road ;; Charlottesville, VA 22903-2475 USA ;----------------------------------------------------------------------- FILEZAP LLLLLLLLLLLLUUUUUUUUUUUU CCCCCCCCCCCCCCCCCCCCCCCCCCCCC FILEZAP: Verb to destroy an external file DOCONFRM -1.0 1.0 > 0 require confirmation ERROR @ -1.0 1.0 > 0 => verb had an error File name to be zapped is an immediate argument e.g. FILEZAP 'MYAREA:SOURCE.BOX' FILEZAP OBOXFILE ---------------------------------------------------------------- FILEZAP Type: Verb Use: FILEZAP is a verb to delete the subsidiary input and output files identified in AIPS with adverbs such as DATAIN, DATAOUT, INFILE, IN2FILE, OUTFILE, OUTPRINT, BOXFILE, OBOXFILE, INTEXT, OUTTEXT, etc. The file to be deleted is provided as an immediate argument which can be either a string adverb or a quoted string. The value of this string is in the usual form which is described in detail in HELP INFILE. Examples are FILEZAP 'MYAREA:source.box' FILEZAP 'MYAREA:source.box OUTFILE = 'FITS:JUNK.FITS' FILEZAP OUTFILE Note that the close quote changes the string to all upper case letters. Thus to delete source.box in my directory pointed to by $MYAREA, I must make the FILEZAP command be the last on the input line and I must omit the close quote as in the 2nd example above. The first example deletes SOURCE.BOX. Input adverbs: DOCONFRM.....> 0 => that you will be asked to confirm the deletion before it occurs. Answer yes or no either all in upper or all in lower case letters. <= 0 => that you had better choose the immediate argument carefully before hitting carriage return Output adverbs: ERROR .....= 1 => an error occurred in the operation, including that the file did not exist = -1 => no error occurred and the file has been deleted ----------------------------------------------------------------