home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / os / vms / 19888 < prev    next >
Encoding:
Text File  |  1992-12-26  |  2.6 KB  |  54 lines

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