UNC and/or Administrator Share as variable without copying to clipboard

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
hermhart
Posts: 255
Joined: 13 Jan 2015 18:41

UNC and/or Administrator Share as variable without copying to clipboard

Post by hermhart »

I am wondering if there is a way to set a UNC and/or Administrative Share as a variable without it also copying to the clipboard?

I can assign it to a variable like this, but it also copies it to the clipboard:

Code: Select all

 #114;
 $unc = <clp>;
 echo $unc;
Is there another way of accomplishing this without it copying?
Windows 11 Pro; 100% scaling

highend
Posts: 15016
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: UNC and/or Administrator Share as variable without copying to clipboard

Post by highend »

Not if you don't construct this kind of path yourself (via scripting)...

Where's the problem that it lands in the clipboard? You can just store (ok, only text) what's inside the clipboard before invoking the command id and restore it back after having assigned the path to the variable...
One of my scripts helped you out? Please donate via Paypal

hermhart
Posts: 255
Joined: 13 Jan 2015 18:41

Re: UNC and/or Administrator Share as variable without copying to clipboard

Post by hermhart »

Thanks. I was just curious if there was a way around it. But I can live with this.
Windows 11 Pro; 100% scaling

jupe
Posts: 3569
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: UNC and/or Administrator Share as variable without copying to clipboard

Post by jupe »

If you are just using the script on your own config, you could enable Clip History, then you can restore prev clipboard with single command, no matter what it was image/file/text.

@Don: I think having the UNC path available as a custom property would be useful, since constructing it via scripting takes a bit of effort.

hermhart
Posts: 255
Joined: 13 Jan 2015 18:41

Re: UNC and/or Administrator Share as variable without copying to clipboard

Post by hermhart »

Thanks, @jupe. Always looking for ideas. :D
Windows 11 Pro; 100% scaling

Post Reply