0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Windowsのbatファイルでクリップボードにテキストコピー

Posted at

やり方

なんか適当にテキストファイル作ります。

hoge.txt
hoge

で、バッチファイルこんなの作ります。

copytoclip.bat
type hoge.txt | clip

hoge.txtの中身がクリップボードにコピーされます。

こっちでも同じです。

copytoclip2.bat
clip < hoge.txt

環境

Windows Vista以降なら使えるみたいですが、Windows10でしか試していません。

用途

パスワードマネージャであちこちのパスワード管理してるんですが、たまにパスワードマネージャが使えない場合がありますよね。たとえばパスワードマネージャ自体のパスワードとか、プロキシのパスワードとか。
そんなのに限って長くて複雑なやつつけたいし、だけど打つの面倒くさいって思ったので。

その他

タスクバーのショートカットにでも仕込んでおくと便利です。
タスクバー右クリック > ツールバー(T)

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?