windows - 将 Windows 磁盘路径转换为注册表文件中的 Uri 路径
问题描述
正如我在问题中已经提到的,我正在尝试将 Windows 路径转换为注册表文件中的 Uri 路径。
然后将转换后的 Uri 路径复制到剪贴板,如下面的代码所示:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\shell\Copy As Uri Info]
[HKEY_CLASSES_ROOT\*\shell\Copy As Uri Info\command]
@="cmd.exe /q /v:on /e:on /c \"set FilePath=\"%1\" & set UriPath=file:///%%FilePath:\=/%% & echo !UriPath!|clip\""
[HKEY_CLASSES_ROOT\Directory\shell\Copy As Uri Info]
[HKEY_CLASSES_ROOT\Directory\shell\Copy As Uri Info\command]
@="cmd.exe /q /v:on /e:on /c \"set FilePath=\"%1\" & set UriPath=file:///%%FilePath:\=/%% & echo !UriPath!|clip\""
但是,当我运行此注册表文件,然后右键单击并在任何文件或文件夹上选择“复制为 Uri 信息”时,它会复制“!UriPath!” 到剪贴板。
任何人都可以帮忙吗?
解决方案
推荐阅读
- php - 如何在 Microsoft Dynamics Nav 中通过 API 选择 Bill-to 和 Ship-to 字段值?
- node.js - Mongoose - 使用数组查找
- python - 无法使用 Python 连接 2 个列表(Int 和文本列表)并将输出数据拆分为单独的文件
- php - 基于多维数组中的子级构建php数组
- sql - 错误:列“owner_name”指定了多次
- java - Java 8 上的 TLS 版本始终默认为 TLSv1
- kubernetes - Prometheus Operator + 新 Kubernetes Minikube = DeadMansSwitch + KubeControllerManagerDown + KubeSchedulerDown + TargetDown
- sql - 与 sum 一起的情况
- header - 改变
在特定的 prestashop 中标记 - sql - MS SQL 根据一个列表执行多个更新