Copy file to ClipBoard using PowerShell

2

What command should I use through PowerShell to send a file to the Clipboard?

I've tried this command: "C: \ Test.text" | Set-Clipboard

But this command copies the text "C: \ Test.text" and not the file into memory.

    
asked by anonymous 16.02.2016 / 17:15

2 answers

1

I think this solves your problem;)

Set-Clipboard -Path C:\NomeArquivo.txt
    
22.04.2018 / 21:30
0

I think the simplest way is to use the commands type and clip :

type C:\NomeArquivo.txt|clip
    
16.02.2016 / 17:29