I am a newbie exploring VMS DCL , what is the DCL command I can use to search for a file in a directory?
Have you looked here: https://www.itec.suny.edu/scsys/vms...
Chapter 3 looks like it has what your looking for.
message edited by mmcconaghy
Thanks! I looked at the link given by you and in the chapter 3. I can list files in the directory, but how do I find one file in the list. DIR command gives me 1000+ files. I just want to see if I have the files starting with a character/file name.
For example : SELECT * FROM WHERE FILE_NAME = 'ABC' OR 'ABC.*' (give me list of all files with name 'ABC.*' or give me file name 'ABC'
Do you know what is the equivalent command for above SQL ?
Thank you very much for your help! very appreciated
To document the exact command that could be used: From the master directory for the target disk ( [000000] ) use the command below:
$ Dir [...]abc.*
The above command will generate a list of all files named ABC with or without any extension. in other words if a file is names ABC. it will be displayed. A file with the name ABC.DAT or ABC.TXT will also be displayed. To display files without any "type" (DAT or TXT as listed above), alter the command to be:
$ dir [...]abc. ! note the trailing DOT
Dan
For some strange reason I don't get any hits when I use the command
$ Dir [...]abc.*
%DIRECT-W-NOFILES, no files found.
Although I have many files that start with abc.
If you are looking for files that contain ABC, you must include wildcard characters as shown below: $ Dir [...]*ABC*. ! note the trailing DOT
The command above will list any files that contain ABC without any extensions.
Adding the $ after the DOT will show all files with ABC in the name with or without extensions.
For your added pleasure... You can use the % wildcard to limit the possibilities as well. The % is a single character wildcard. For example to locate files that are named ABCx where x is a single character, use the command:
$ Dir [...]ABC%. ! note the trailing DOT
Dan