Showing posts with label cmdtricks. Show all posts
Showing posts with label cmdtricks. Show all posts

Find Files by Attribute-Command prompt

File attributes describe files in specific ways. For example, the read-only attribute defines a file that can’t be written—only read. Directories use a special directory attribute that sets them apart from files. The Dir / AAttribute Filename command, where Attribute is the attribute you want to search for, helps you locate specific kinds of files.
Now that you have some idea of how to find files using an attribute, it’s time to look at the available attributes. The following list describes each of the standard attributes:

·        /AA: Locates files that are ready for archiving.
·        /AD: Locates directory entries.

Find Files with Dir Command Prompt

The Dir command provides a host of ways to locate files on your hard drive. Because Dir can check the entire drive, the results are often more accurate than provided with the Windows search mechanisms. In addition, you can sort files as needed (see the “Find Files in Sorted Order” section for details) and locate files based on their attributes (see the “Find Files by Attribute” section for details). The Dir command also supports a number of display options, such as the /X command line switch that shows you the 8.3 (8 dot 3) display name for files used in the registry. Type Dir /? and press Enter to see a complete list of options.

Use these steps to perform a basic search for files.

1. Type Dir Filename, where Filename is the name of the file you want to locate.
(You can optionally add an absolute or relative path to the file specification.)

2. (Optional) Type /S if the file is in a subdirectory.