home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!news.claremont.edu!nntp-server.caltech.edu!SOL1.GPS.CALTECH.EDU!CARL
- From: carl@SOL1.GPS.CALTECH.EDU (Carl J Lydick)
- Newsgroups: comp.os.vms
- Subject: RE: Request help !
- Date: 26 Dec 1992 05:42:50 GMT
- Organization: HST Wide Field/Planetary Camera
- Lines: 40
- Distribution: world
- Message-ID: <1hgrcqINNfjb@gap.caltech.edu>
- References: <9212242318.AA04439@uu3.psi.com>
- Reply-To: carl@SOL1.GPS.CALTECH.EDU
- NNTP-Posting-Host: sol1.gps.caltech.edu
-
- In article <9212242318.AA04439@uu3.psi.com>, leichter@lrw.com (Jerry Leichter) writes:
- >However, if you do that and try to delete 1.DIR, you'll STILL fail, with a
- =different error message. This time, you'll get: "Directory file is not
- =empty". RMS won't let you delete a directory that contains files. Normally,
- =you could just delete everything from the directory - but the only thing "in"
- =[.1] is 2.DIR, which is the same file - so deleting IT fails with yet another
- =error message: "File access conflict" (which, BTW, I can't exactly explain,
- =though it makes sense in broad terms).
- =
- =There IS a solution: You have to "undo" the synonym you created with
- =SET FILE/ENTER. The "reverse" of this command is SET FILE/REMOVE. If you
- =do:
- =
- = $ SET FILE/REMOVE [.1]2.DIR;
- =
- =you'll find that you are back to where you where after you first created [.1],
- =with an empty directory. If the protection allows it, you can now delete it
- =with no further problems.
-
- While what Jerry recommends will work, what he says is not QUITE true. At
- least under VMS v5.4-2, you CAN (apparently) DELETE a non-empty directory. I
- say "apparently" because under recent releases of VMS, the DELETE command
- distinguishes between the "primary" directory entry for a file and "secondary"
- entries (which is the primary entry is determined by the directory backlink and
- filename fields in the file header). DELETE will now do a "SET FILE/REMOVE"
- for secondary directory entries, and does an actual DELETE only for the primary
- entry. So, for example, the following works:
- $ CREATE/DIRECTORY [.1]
- $ SET FILE/ENTER=[.1]2.DIR;1 1.DIR;1
- $ SET PROTECTION=O=RWED 1.DIR;1
- $ DELETE [.1]2.DIR;1
- $ DELETE 1.DIR;1
- --------------------------------------------------------------------------------
- Carl J Lydick | INTERnet: CARL@SOL1.GPS.CALTECH.EDU | NSI/HEPnet: SOL1::CARL
-
- Disclaimer: Hey, I understand VAXen and VMS. That's what I get paid for. My
- understanding of astronomy is purely at the amateur level (or below). So
- unless what I'm saying is directly related to VAX/VMS, don't hold me or my
- organization responsible for it. If it IS related to VAX/VMS, you can try to
- hold me responsible for it, but my organization had nothing to do with it.
-