Monday, October 29, 2007

Windows Vista: File Path Shortcuts (DOS Prompt)

If you like using the command line, you may or may not know the following shortcuts that can help you to be more efficient.

Instead of manually typing a file or directory name you can use the Tab key to complete the name of a file or path. For example, if there are three files in a directory name FileA, FileB, and FileC. If you typed "Fi" and press the Tab key, the file name 'FileA' will automatically be completed. If you press the Tab key again, 'FileA' will become 'FileB', then 'FileC' if the key is pressed again.

This same trick can be applied to directory names. For example, if there are three sub-directories called 'DirectoryA', 'DirectoryB', and 'DirectoryC' in a directory. All you would have to do is type the first few characters of the sub-directory's name and then press the Tab key to complete it or cycle through the other names.

A similar trick is that you can use the '*' (astrick) to act like a wildcard in a directory or file's name. For example, If you typed "cd \pro*\mic*", you would be taken to 'C:\Program Files\Microsoft'.

No comments: