【发布时间】:2014-03-02 21:04:00
【问题描述】:
如果我这样做:
>where notepad*.*
C:\Windows\System32\notepad.exe
C:\Windows\notepad.exe
但是当我尝试时:
where Amb*.* /r "i:\Descargas Automatizadas\"
ERROR: El nombre de archivo, el nombre de directorio o la sintaxis de la etiqueta del volumen no son correctos.
抱歉,我的 Windows 是西班牙语,所以翻译应该是这样的:
ERROR: Filename, path or syntax in volume label are wrong.
我的解决方法是:
mklink /d AmberMichaels "i:\Descargas Automatizadas\"
>where Amb*.* /r AmberMichaels
h:\Temporal\Pruebas\AmberMichaels\AmbMicMeg_Amber_Michaels_-_18_and_Lost_in_Miami_sc2_Frank_Fortuna.wmv
h:\Temporal\Pruebas\AmberMichaels\AmbMicMeg_Amber_Michaels_-_ForceFantasies.com_clip1.wmv
它有效,但对于脚本问题,我认为这应该是一个问题,至少在带有空格的目录中搜索时(也就是说:如果空格字符是这里的问题,我不确定)。此外,在 Windows 7 中创建链接(mklink 命令)需要提升(管理员)。
我错了吗,也许对 where 命令有某种更新可以解决这个问题?
如果不是:编写脚本时处理此问题的最佳方法是什么?
【问题讨论】:
标签: windows shell command-line namespaces