HP3000-L Archives

November 1998, Week 3

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Mike Fitzwilliam <[log in to unmask]>
Reply To:
Mike Fitzwilliam <[log in to unmask]>
Date:
Wed, 18 Nov 1998 09:41:23 +0000
Content-Type:
text/plain
Parts/Attachments:
text/plain (24 lines)
Glenn J. Koster, Sr. wrote:

> Is there any way through FINFO to tell if a file is permanent or
> temporary?  If you simply do an FINFO("<filename>","EXISTS"), it returns
> true regardless of the domain.
>

Here's an example based on part of a login shell script I wrote to stop
a user executing a temporary command file they have created:

USER DEFINED COMMAND FILE:  DOCMD.PUB.HPSDMF

parm command
setvar cmdfile ups("!command")
if finfo(cmdfile,"exists") then
   if finfo(cmdfile,"intfopt") band 3 = 2 then
      echo Can't execute temporary command file
   else
      !cmdfile
   endif
else
   echo !cmdfile does not exist
endif

ATOM RSS1 RSS2