You can use wildcards and extended wildcards as part of the text. DIR will display a file if its description matches the text after the /I switch. For example, this command displays the names of all of the subdirectories of the current directory:įinally, with the /I option, DIR can select files to display based on their descriptions (see DESCRIBE for more information on file descriptions). You can also select files by their attributes by using the /A option. WK1 files in the D:\DATA directory and each of its subdirectories: You can include files in the current or named directory plus all of its accessible subdirectories by using the /S option. This example displays the same files as the previous example, but the. Only the first filename in an include list can have a path the other files must be in the same path. If you use an include list to link multiple filenames, DIR will display the matching filenames in a single listing. You may use a different drive and path for each filename. If you link two or more filenames together with spaces, DIR will display all of the files that match the first name and then all of the files that match the second name. If you specify a filename for a non-LFN drive which includes some wildcards, and does not include an extension, DIR will append. This default displays all non-hidden files and subdirectories in the current directory. If you don't specify a filename, DIR defaults to * on LFN drives, and *.* on drives which do not support long file names. TXT files whose names begin with A, B, or C : DIR can work with the normal wildcard characters (* and ?) and the extended wildcards. The simplest way to view information about several files at once is to use wildcards. To display information about a single file, just add the name of the file to the DIR command line: The sections are:ĭIR can display information about a single file or about several, dozens, hundreds, or thousands of files at once. If you find some of the information in a category too detailed for your needs, feel free to skip to the beginning of the next section. Many of the sections move from a general discussion to more technical material. The following sections group DIR's features together in several categories. When you use DIR on an LFN drive, you must quote any file names which contain white space or special characters. To set up this format as the default, using an alias: You can select those options permanently by using the ALIAS command.įor example, to display all the files in the current directory, in 2 columns, sorted vertically (down one column then down the next), and with a pause at the end of each page: You will soon know which options you want to use regularly. The best way to learn how to use the many options available with the DIR command is to experiment. The various DIR displays are controlled through options or switches. DIR and PDIR are related, but they do not have identical switches and they are not intended to produce identical output. If you want to produce customized output that will be subsequently parsed by another program or batch file, or if you need a special-purpose directory display, see the PDIR command. You can also display information in 1, 2, 4, or 5+ columns, sort the files several different ways, use color to distinguish file types, and pause after each full screen. Depending on the options chosen, you can display the file name, attributes, and size the time and date of the last change to the file the file description and the file's compression ratio. Internet: Can be used with HTTP and FTP servers.ĭIR can be used to display information about files from one or more directories (local or remote), in a wide range of formats. Supports command dialog, extended wildcards, ranges, multiple file names, and include lists. See also: ATTRIB, DESCRIBE, PDIR, SELECT, and SETDOS.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |