HPE Community read-only access December 15, 2018
This is a maintenance upgrade. You will be able to read articles and posts, but not post or reply.
Dec 15, 4:00 am to 10:00 am UTC
Dec 14, 10:00 pm CST to Dec 15, 4:00 am CST
Dec 14, 8:00 pm PST to Dec 15, 2:00 am PST
Operating System - OpenVMS
Showing results for 
Search instead for 
Did you mean: 

Files with no name

Go to solution
Art Wiens
Respected Contributor

Files with no name

I have yet another directory with 10's of thousands of files of small files consuming vast amounts of allocated space (because of a poor choice on cluster size). I noticed while trying to list the contents of the directory, that there are "many" files that don't have a name ie. just an extension and a version.

How can I "work" with these files. If I enter DIR [dir.subdir].TXT;* I get all .TXT files, not just the no-name ones.

My goal is to backup/delete the files by year created and put them in subdirectory from where I can ZIP them if they are old enough.

Thanks in advance,
Steven Schweda
Honored Contributor

Re: Files with no name

"%*.TXT" (or "*%.TXT") will match only the
ones with a non-null name.

alp $ dire %*.txt

Directory ALP$DKA0:[SMS.TEST3]


Total of 1 file.

alp $ dire /excl = %*.txt *.txt

Directory ALP$DKA0:[SMS.TEST3]


Total of 1 file.
John Gillings
Honored Contributor

Re: Files with no name


The issue here is the DIRECTORY command default filespec of *.*;*

If you leave the filename field blank, DIRECTORY will fill in "*". As Steven has shown, "%*" means "any non null", so the /EXCLUDE qualifier can be used to exclude those files, leaving you with the ones you're interested in.

Another method is to use a command which doesn't have a wildcard default filename. For example:


or use F$SEARCH

$ loop:
$ f=F$SEARCH(".TXT;*")
$ IF f.NES."" THEN GOTO loop

The important thing to take away from this is that the behaviour you see is a result of the DIRECTORY command, not RMS filespecs in general (but note that BACKUP uses the same defaults as DIRECTORY...)

RENAME is like COPY, so you can just RENAME the files into a subdirectory:

A crucible of informative mistakes
Art Wiens
Respected Contributor

Re: Files with no name

Thanks guys!