Board logo

标题: 高手帮帮忙 [打印本页]

作者: wangyang331407     时间: 2010-12-24 00:02    标题: 高手帮帮忙

@echo off
setlocal enabledelayedexpansion
for %%a in (c d e f g h i j k l m n o p q r s t u v w x y z) do (
  for /f %%h in ('fsutil fsinfo drivetype %%a:^|findstr "Removable.* 可移

动"') do (
    set DriveU=%%h
)
)
echo.!DriveU!
for /r "!DriveU!\" %%i in (*.doc*) do echo %%~ni
pause

为什么“for /r "!DriveU!\" %%i in (*.doc*) do echo %%~ni
”这个没用啊