>>>>> "Alan" == "Alan Winston writes: Alan> In article , Michael Zarlenga writes: >> In comp.os.vms Jan-Erik S�derholm wrote: >> :> Is that true? If so how do you delete all files called something.x and >> :> all files called something.c at the same time on VMS? >> >> : delete *.c.*,*.x.* >> >> I don't think that's what he was asking. >> >> He wants to delete the *.c files that have a corresponding *.x >> file (the same "something" in both cases). Alan> If that's what he means, then you'd have to write a little DCL. (Not Alan> tested, sorry.) This'll find every *.c file, delete it, and delete the Alan> corresponding .x file if there is one. Alan> $ START: Alan> $ CFILE = F$SEARCH ("*.c;*",1) Alan> $ IF (CFILE .EQS. "") THEN EXIT ! didn't find any more Alan> $ DELETEX/NOCONFIRM 'CFILE Alan> $ ! If you want to get only the corresponding .x version for each .c Alan> $ ! version, the command below will do it; otherwise do Alan> $ ! ".X;*" and leave off the second F$PARSE Alan> $ XFILE = F$PARSE(CFILE,,,"NAME") + ".X" + F$PARSE(CFILE,,,"VERSION") Alan> $ XFILE = F$SEARCH (XFILE,2) Alan> $ IF (XFILE .EQS. "") THEN GOTO START Alan> $ DELETEX/NOCONFIRM 'XFILE Alan> $ GOTO START They way I read the spec, the two DELETEX's need to be together down at the bottom. This deletes all .c files, not only those that have a matching .x Nothead