标题: [文件操作] 批处理如何实现复制文件到剪贴板 [打印本页]
作者: woshishui123 时间: 2018-4-2 16:13 标题: 批处理如何实现复制文件到剪贴板
本帖最后由 pcl_test 于 2018-4-3 17:42 编辑
只想通过bat复制文件到剪切板,但先不粘贴,后再用鼠标手动粘贴。
作者: Batcher 时间: 2018-4-3 10:58
Win7以上的系统推荐使用 clip 这个命令
作者: qazplm 时间: 2018-4-6 07:39
- set "file=D:\123\test.txt"
- powershell -sta "$sc=New-Object System.Collections.Specialized.StringCollection;$sc.Add('%file%');Add-Type -Assembly 'System.Windows.Forms';[System.Windows.Forms.Clipboard]::SetFileDropList($sc);"
复制代码
作者: CrLf 时间: 2018-4-7 19:30
- echo 测试.doc | xclip /Copy
复制代码
xclip下载地址:http://www.bathome.net/s/tool/index.html?key=xclip
欢迎光临 批处理之家 (http://bbs.bathome.net/) |
Powered by Discuz! 7.2 |