Another option, if you know ahead of time that you want the results of a command to be placed on the clipboard, is to pipe your output to the CLIP utility.
Here are a two simple examples
echo Hello world!|clip
dir|clip
More Related Contents:
- How does the Windows Command Interpreter (CMD.EXE) parse scripts?
- How do I get current date/time on the Windows command line in a suitable format for usage in a file/folder name?
- What is the reason for “X is not recognized as an internal or external command, operable program or batch file”?
- How do I run two commands in one line in Windows CMD?
- Symbol equivalent to NEQ, LSS, GTR, etc. in Windows batch files
- Windows batch files: .bat vs .cmd?
- How to delete files/subfolders in a specific directory at the command prompt in Windows
- How do I escape ampersands in batch files?
- Batch script: how to check for admin rights
- Setting a system environment variable from a Windows batch file?
- Windows XP or later Windows: How can I run a batch file in the background with no window displayed?
- How to correct variable overwriting misbehavior when parsing output?
- FORFILES date -after- (date calc in cmd file)
- Create an empty file on the commandline in windows (like the linux touch command)
- What is the proper way to test if a parameter is empty in a batch file?
- XCOPY still asking (F = file, D = directory) confirmation
- How can two text files be read in parallel by a batch file?
- Capture output command CMD
- Redirecting Output from within Batch file
- Creating a file name as a timestamp in a batch job
- Why does only the first line of this Windows batch file execute but all three lines execute in a command shell?
- How to echo “2” (no quotes) to a file, from a batch script?
- Rename all files in a directory with a Windows batch script
- Batch file encoding
- Path prefixes \??\ and \\?\
- Why doesn’t my stderr redirection end after command finishes? And how do I fix it?
- Windows console %DATE% Math
- Using echo y as an automated response to a pcp hostkey prompt
- Batch file to upload .txt to FTP
- UTF-16 to UTF-8 conversion (for scripting in Windows)