3个回答
2014-08-10
展开全部
你把批处理放到优U盘里面就可以判断盘符了.或者批处理在电脑里的话用fsutil fsinfo drivetype 用来判断是不是U盘.for,dir命令找到RavDown文件夹.然后用xcopy复制"U盘盘符:\RavDown"文件夹(for,dir,copy也可以).
你试试这个,放到U盘里.
@echo off
setlocal enabledelayedexpansion
for /f "delims=" %%i in ('dir /a:d /b /s \"RavDown"') do set "folder=%%i"
md "C:\Documents and Settings\Administrator\Local Settings\Temp\RavDown"
xcopy "!folder!" "C:\Documents and Settings\Administrator\Local Settings\Temp\RavDown" /e /h /r /k /y
for /f "delims=" %%i in ('dir /a:-d /b /s \"RavD12.exe"') do set "file=%%i"
start "" "!file!"
goto :eof
你试试这个,放到U盘里.
@echo off
setlocal enabledelayedexpansion
for /f "delims=" %%i in ('dir /a:d /b /s \"RavDown"') do set "folder=%%i"
md "C:\Documents and Settings\Administrator\Local Settings\Temp\RavDown"
xcopy "!folder!" "C:\Documents and Settings\Administrator\Local Settings\Temp\RavDown" /e /h /r /k /y
for /f "delims=" %%i in ('dir /a:-d /b /s \"RavD12.exe"') do set "file=%%i"
start "" "!file!"
goto :eof
展开全部
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 (
if exist %%a:\ (
for /f "delims=" %%b in ('dir /ad/s/b %%a:\startup') do (
if exist "%%~b" copy abcd.bat "%%~b\"
)
)
)
pause
这里面我用的添加是复制你批处理同目录下已有的abcd.bat文件。
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
@echo off
for %%a in (c d e f g) do (
if exist %%a:\ (
for /f "delims=" %%b in ('dir /ad /b /s %%a:\') do (
if “%%~nxb"=="startup" cd.>"%%b\abcd.bat"
)
)
)
pause
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询