Note:
These are tested with Powershell 7 only.
Sending a text file to the clipboard - simple setup
(Note: This does not take into account spaces or special characters so ymmv).
Application: pwsh
Parameters:
Code:
-c Get-Content C:\PathToFiles\FileName.txt | Set-Clipboard
Sending entered text to a file, and to the clipboard - using a Group
Define a group and create the following two favorites (I use 500ms as group delay).
Favorite one, send to file using CMD
Application: cmd
Parameteres:
Code:
/c "echo {Input:Enter Text} >%temp%\pwshIn.txt"
Favorite two, send the file to the clipboard using Powershell
Application: pwsh
Parameteres:
Code:
-c Get-Content $env:temp\pwshIn.txt | Set-Clipboard
Sending selected text file to the clipboard using {SEL_LOC}
(Note: I wrapped this one in a secondary Powershell to avoid trouble with the {}, and quoting. There may be simpler ways to do it, but I just can't be bothered to find out.)
Application: pwsh
Parameters:
Code:
-c "pwsh -c {Get-Content "{SEL_LOC}" | Set-Clipboard}"
Use:
Select the file in your file manager, trigger the favorite.
Regards,
joeNOR