PowerShell.exeで引数をクリップボードに送る2行バッチファイル
バッチファイルやコマンドプロンプトで、インラインに書くこともできます。
SETCLIP.CMD 引数...
SET args=. getargs %*
PowerShell.exe -command "function getargs{$xargs=$args}iex $env:args;[void][Reflection.Assembly]::LoadWithPartialName('System.Windows.Forms');$textbox=new-object System.Windows.Forms.TextBox;$textbox.Multiline=$true;$textbox.Text=[String]::Join([Char]13+[Char]10,$xargs);$textbox.SelectAll();$textbox.Copy()"
« PowerShell.exeでクリップボードを標準出力に取り出す1行バッチファイル | トップページ | PowerShellの.PS1ファイルを起動するバッチファイル(その4) »