![]() |
China DOS Union-- Unite DOS · Advance DOS · Grow DOS --Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum |
| Guest | Log in | Register | Members | Search | China DOS Union |
|
中国DOS联盟论坛 The time now is 2026-09-23 13:29 |
47,812 topics / 349,917 posts / today 0 new / 48,273 members |
| DOS批处理 & 脚本技术(批处理室) » Regarding copying and registering DLL files, thank you in advance to the experts! |
| Printable Version 2,344 / 4 |
| Floor1 sybwyn | Posted 2010-11-29 21:04 |
| 新手上路 Posts 12 Credits 12 | |
|
I'm tinkering with a batch program and I'm stuck. I'd like some expert advice:
@echo off Title=Welcome to Use the Client Foolish Update Program`-` if exist C:\Xcopyfile.txt del C:\Xcopyfile.txt /q /f xcopy \\192.168.1.101\客户端\fmis3.0_release :\ygfmis\bin /d /i /s /c /e /h /y > C:\Xcopyfile.txt for /f "delims=" %%i in (c:\Xcopyfile.txt) do (findstr "*.dll" "%%i" >c:\Regonlyfile.txt) for /f "tokens=*" %%m in (c:\Regonlyfile.txt) do ( echo. & echo Registering this file: %%m tregsvr %%m) endlocal :end echo. echo Registration completed successfully! Description: The function to be implemented is very simple. It's to copy the client files from the server path to this computer, and only register the dll files, that is, open them with C:\WINDOWS\system32\regsvr32. I'm still in the learning stage, and I don't understand many things. Please help me modify it. I know there's a problem starting from the for loop... |
|
| Floor2 Hanyeguxing | Posted 2010-11-30 00:01 |
| 银牌会员 Posts 897 Credits 1,039 From 在地狱中仰望天堂 | |
|
```
@echo off&Title=Welcome to use the client fool-style update program xcopy \\192.168.1.101\Client\fmis3.0_release C:\ygfmis\bin /discehy>C:\Xcopyfile.txt for /f "delims=" %%a in ('findstr /i \.dll C:\Xcopyfile.txt') do ( echo/&echo Registering this file: %%a Regsvr32 /s "%%a" ) echo/&echo Registration completed successfully!&pause ``` |
|
| Floor3 sybwyn | Posted 2010-11-30 20:17 |
| 新手上路 Posts 12 Credits 12 | |
|
Thanks to the expert! I've given you points!
|
|
| Floor4 zaixinxiangnian | Posted 2010-12-02 00:40 |
| 初级用户 Posts 106 Credits 151 From 河南省 | |
|
I also give you extra points,,,,, I think Hanyeguxing is very proficient in using FOR
|
|
| Floor5 cyn01livecn | Posted 2011-01-18 14:52 |
| 初级用户 Posts 23 Credits 28 | |
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |