无忧启动论坛

标题: 如何COPY 1.dll 到D:\所有目录下呢 [打印本页]

作者: 2011275081672    时间: 2011-3-26 12:22
标题: 如何COPY 1.dll 到D:\所有目录下呢
例如拷贝一个 123.dll 到QQ\users\所有用户目录下
作者: haiou327    时间: 2011-3-26 13:44
@echo off
setlocal ENABLEDELAYEDEXPANSION
for /f "usebackq delims==" %%i in (`dir /ad/b "%ProgramFiles%\Tencent\QQ\Users"`) do (
if
"%%i" NEQ "All Users" set DP="%ProgramFiles%\Tencent\QQ\Users\%%i"
copy 123.dll !DP!
        )

作者: renchmin    时间: 2011-3-26 14:23
原帖由 haiou327 于 2011-3-26 13:44 发表
@echo off
setlocal ENABLEDELAYEDEXPANSION
for /f "usebackq delims==" %%i in (`dir /ad/b "%ProgramFiles%\Tencent\QQ\Users"`) do (
if "%%i" NEQ "All Users" set DP="%ProgramFiles%\Tencent\QQ\User ...

这个很不错的啊,支持了啊。
作者: haiou327    时间: 2011-3-26 17:13
@echo off
setlocal ENABLEDELAYEDEXPANSION
for /d %%i in ("%ProgramFiles%\Tencent\QQ\Users\*") do (
   if
"%%~ni" NEQ "All Users" set DP="%%i"
   
copy 123.dll !DP!
                       )

作者: chp_phoenix    时间: 2011-3-26 17:18
哈哈 批处理命令有时候很有用的
我也要学习学习了
作者: 2011275081672    时间: 2011-3-26 21:55
标题: 回复 #4 haiou327 的帖子
哈 版主出动就是不一班
作者: 2011百喜    时间: 2011-3-28 16:57
好强喔
不愧是超级版主
赶紧学习学习
作者: tansuo    时间: 2011-4-6 15:50
haiou327 (YY写写) 对命令很有研究,一次比一次简练高效...
作者: haiou327    时间: 2011-4-6 23:25
相互学习吧!

@echo off
for /d %%i in ("%ProgramFiles%\Tencent\QQ\Users\*") do (
   if
"%%~ni" NEQ "All Users" set DP="%%i"
   
call copy 123.dll %%DP%%
                             )





欢迎光临 无忧启动论坛 (http://bbs.wuyou.net/) Powered by Discuz! X3.3