How to use a PowerShell Script in the Windows "SendTo" folder?

1

There are instructions on how to use a bash script in the SendTo folder (using the instructions in the below link). However, I would like to execute a PowerShell script instead.

Is it possible to use a shell script in the sendto folder

I would like for the shortcut to execute a PowerShell function that I have defined in my PowerShell profile called, Invoke-SendToUPLOAD... where Invoke-SendToUPLOAD accepts the full file path of the sendto file as a parameter by default.

I "almost" have what I want. However, filepaths that have spaces in them are truncated. Could someone tell me how to preserve the filepath even if there's a space in the path. I've tried putting double-quotes around %1 below. However, that doesn't work either.

C:\Windows\System32\cmd.exe /c start /min cmd.exe /c PowerShell.exe -Command "& {param ($I = {%1} ); Invoke-SendToUPLOAD }"

MKANET

Posted 2019-09-14T07:49:16.597

Reputation: 130

No answers