DIRECTORY Commander, IO, PFS, Rope; RemoveLinkedFilesImpl: CEDAR PROGRAM IMPORTS Commander, IO, PFS ~ BEGIN RLFCommand: Commander.CommandProc ~ { star: PFS.PATH ~ PFS.PathFromRope["*"]; Recurse: PROC ~ { PFS.EnumerateForInfo[pattern: star, proc: Each] }; Each: PFS.InfoProc ~ { IF fileType = PFS.tDirectory AND attachedTo = NIL THEN { PFS.DoInWDir[fullFName, Recurse]; } ELSE { IF attachedTo # NIL THEN { cmd.out.PutF1["removing %g\n", [rope[PFS.RopeFromPath[fullFName]]] ]; PFS.Delete[fullFName]; }; }; }; PFS.EnumerateForInfo[pattern: star, proc: Each]; }; Commander.Register["RemoveLinkedFiles", RLFCommand, "Deletes all files in current WD that have attachments (links)"]; END. † RemoveLinkedFilesImpl.mesa Copyright Σ 1993 by Xerox Corporation. All rights reserved. Willie-s, March 3, 1993 12:59 pm PST ΚW•NewlineDelimiter ™code™Kšœ Οeœ1™