I copy a text from .cpp file using the command-line using this command Get-Content -Raw file_name | clip in Windows 10
and I'm trying to paste that text into another file in another directory
I've tried using the cat command to redirect the output to a new file like
cat -Raw file_name > path_to_new_file
it works , but I want to paste the same text to more than one path
the point , is there any keyword or alias that store the text copied earlier , to paste it where I want or is there any keyword or alias return the last copy in the clipboard
Can someone please help me with this issue? How can I paste the copied text to a file in another directory using the command prompt ?
I've tried using the cat command to redirect the output to a new file like
cat -Raw file_name > path_to_new_file
it works , but I want to paste the same text to more than one path
To recall the clipboard contents, use
Get-Clipboard:That being said, you don't need to use the clipboard - simply store the file contents in a variable and reference that: