Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CMD - Any command to copy text to clipboard?

Tags:

copy

windows

cmd

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--
like image 720
NeoHBz Avatar asked Oct 30 '25 01:10

NeoHBz


1 Answers

To copy a command result pipe it to clip

dir | clip
like image 150
emKaroly Avatar answered Oct 31 '25 16:10

emKaroly