[ Last edited by sea2moon on 2007-1-17 at 09:13 AM ]作者: tao0610 时间: 2007-1-17 07:45 用%userprofile%作者: samual2004 时间: 2007-1-30 23:23 空格问题而已,朋友。
你假如路径中有空格
就一定要有引号了。 作者: shw1395 时间: 2008-5-2 00:43 那为什么我这句加了引号也不行:
for %%i in ("%USERPROFILE%\桌面\REG\*.reg") do regedit %%i
在线等!作者: shw1395 时间: 2008-5-2 01:18 5.1劳动节,没人回答:(
我用笨办法解决了:
cd %USERPROFILE%\桌面\REG\
c:
for %%i in (*.reg) do regedit /s %%i
第二种方法:
for /f "delims=" %%a in ('dir "%USERPROFILE%\桌面\*.reg" /b') do regedit %%a
含有空格文件名时出错,只能再改,在论坛花了半小时搜索到解决办法,原来要加引号:
for /f "delims=*" %%a in ('dir "%USERPROFILE%\桌面\*.reg" /b') do regedit "%%a"
[ Last edited by shw1395 on 2008-5-2 at 04:49 AM ]作者: huoshui 时间: 2008-5-17 03:01 物品时拿不到作者: wgx1688 时间: 2009-10-19 23:30 呵呵