Copy CommandLine Output To Windows Clipboard
Thank you, Amit Agarwal (commandline tip)!
The following is a great little tip for working with the Windows Commandline interface:
If you add the pipe* operator (|) to your command followed by the “clip” command, the output of your original command will get saved to the Windows clipboard and won’t print inside the Command Prompt window.
Here are some examples:
- dir | clip Copy the content of a folder to the clipboard.
- tree | clip Display the recursive directory structure and save it to the clipboard.
- type error.log | clip Place the content of the file error.log to the clipboard.
- sort file.txt | clip Sort the file and save the sorted output to the clipbord.
- ipconfig /all | clip Get details of your network connection for sending to tech support.
Author
Stewart Schatz
More Stories
How to Use the rsync Command to Sync Files and Directories on Linux
The rsync command is one of the most powerful tools in the Linux toolkit for syncing files and directories. Whether...
How to Use the CMDKEY Command to Manage Stored Credentials on Windows
The cmdkey command is a Windows utility that lets you create, delete, and manage stored credentials for network authentication. This is particularly useful…
How to Use the XCOPY Command in Windows
Did you know that all versions of Windows have a limitation of 260 characters that can be in the path...
How to Clean Up Empty Directories Using the find Command in Linux
Managing files and directories in Linux often involves dealing with empty directories that can clutter your workspace. Manually finding and...
How to Print a Directory Structure Using PowerShell: Step-by-Step Guide
If you need to print out the directory structure and list the files within, this PowerShell script will help you...
VirtualBox Fails After Windows 11 Upgrade (NtCreateFile failed)
After upgrading from Windows 10 to Windows 11, VirtualBox fails to start your Virtual Machine. You receive this error: NtCreateFile...
Average Rating