Copy DOS Directory Contents To Clipboard

Here’s a neat Windows/DOS trick I betcha didn’t know about:

To copy the file and directory names from a command-line window (DOS prompt):

dir /b | clip

The “| clip” portion copies the output from the command (“dir /b” in this example) to the windows clipboard. You can then just paste into any document.

Here’s an article that provides more detail about it except you don’t need to download the “clip.exe” program if you’re using Windows 7.

4 Replies to “Copy DOS Directory Contents To Clipboard”

Leave a Reply

Your email address will not be published. Required fields are marked *

*