NeoHBz
NeoHBz

Reputation: 150

CMD - Any command to copy text to clipboard?

Is there any command in Command Prompt (CLI) which will allow a string of text to be copied to device's clipboard... Like, for an instance,

@echo off
set /p text=Enter text to be copied to clipboard:
--some command here to copy the %text% to clipboard--

Upvotes: 4

Views: 6080

Answers (1)

emKaroly
emKaroly

Reputation: 796

To copy a command result pipe it to clip

dir | clip

Upvotes: 7

Related Questions