如何从Windows资源管理器中的剪贴板获取文件路径?

时间:2019-03-23 20:45:06

标签: vbscript clipboard wscript.shell

我试图在Windows资源管理器中从剪贴板(复制的文件)获取文件路径。

我写道:

Set Ws = CreateObject("WScript.Shell")
MsgBox Ws.ClipBoard

但是它指出错误:

  

错误:对象不支持此属性或方法:'Ws.ClipBoard'

我有很多获取剪贴板数据的方法,但仅与Internet Explorer有关,而与Windows Explorer文件路径无关。

1 个答案:

答案 0 :(得分:0)

这显示了如何使用HDrop。 VBScript可以轻松移植到VB.NET(将所有参数括在方括号中,并使所有upstream docker-api { server api; } server { listen 80; server_name xxxxxxxxxxxxxx; location /static { autoindex on; alias /static/; } location /uploads { autoindex on; alias /uploads/; } location / { proxy_pass http://docker-api; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Host $server_name; } } 变暗)。

As Object

REM PrintClip.bat #2 Also does filenames on the clipboard
REM This file compiles PrintClip.vb to PrintClip.exe
REM PrintClip.exe prints any text or filenames on the clipboard to a console
REM To use 
REM PrintClip
"C:\Windows\Microsoft.NET\Framework\v4.0.30319\vbc.exe" /target:exe /out:"%~dp0\PrintClip.exe" "%~dp0\PrintClip.vb" /verbose
pause