China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-12 17:30
中国DOS联盟论坛 » DOS学习入门 & 精彩文章 (教学室) » Help me take a look! View 1,188 Replies 3
Original Poster Posted 2003-05-26 00:00 ·  中国 贵州 贵阳 电信
初级用户
Credits 123
Posts 4
Joined 2003-05-21 00:00
23-year member
UID 2305
Gender Male
Status Offline
@echo off
rem set the mapped drive letter
set mm=k:
rem set the source folder path
set lj=d:\1\
rem set the target folder path
set mb=1
echo The following computers did not finish copying because they were shut down! In the spirit of being conscientious and responsible about the work, please check them! > d:\err.txt
echo Computers copied successfully! > d:\ok.txt
:star
if "%1"=="" goto end
net use "%mm%" \\%1\d sa0714
if not exist "%mm%"\*.* goto err
cls
echo.
echo.
echo.
echo.
echo.
echo.
echo Copying games to computer %1! The mapped drive you are using now is "%mm%"
echo.
echo.
echo.
echo.
echo.
echo.
xcopy/y/e "%lj%" ""%mm%"\"%mb%"\"
if errorlevel 5 goto err1
if errorlevel 4 goto err1
if errorlevel 3 goto err1
if errorlevel 2 goto err1
if errorlevel 1 goto err1
if errorlevel 0 goto ok1
k1
echo Computer %1 has been copied successfully >>d:\ok.txt
net use "%mm%" /del /y
shift
goto star
:err
cls
echo.
echo.
echo.
echo.
echo.
echo.
echo Computer %1 may be shut down! Please check!
echo.
echo.
echo.
echo.
echo.
echo.
echo %1 >>d:\err.txt
shift
goto star
:err1
cls
echo.
echo.
echo.
echo.
echo.
echo.
echo Computer %1 has been interrupted! It may be that the target computer shut down abnormally or restarted, or that disk space is insufficient
echo.
echo.
echo.
echo.
echo.
echo.
echo %1 >>d:\err.txt
shift
goto star
:end
cls
echo.
echo.
echo.
echo.
echo.
echo.
echo Copyright of this program belongs to Zhang Qiang Tel: 8901381
echo.
echo.
echo.
echo.
echo.
echo.
c:\windows\NOTEPAD.EXE d:\err.txt
c:\windows\NOTEPAD.EXE d:\ok.txt
rem set the mapped drive letter
set mm=
rem set the source folder path
set lj=
rem set the target folder path
set mb=
Floor 2 Posted 2003-05-26 00:00 ·  中国 贵州 贵阳 电信
初级用户
Credits 123
Posts 4
Joined 2003-05-21 00:00
23-year member
UID 2305
Gender Male
Status Offline
My skill level is limited. Could everyone help me improve it a bit?
Floor 3 Posted 2003-05-26 00:00 ·  美国 肯塔基州 费耶特县 列克星敦 Charter_Communications
系统支持
★★★★★★
“新DOS时代”站长
Credits 27,736
Posts 10,521
Joined 2002-10-09 12:00
23-year member
UID 9
Status Offline
What kind of optimization are you trying to make?
Wengier - 新DOS时代

欢迎大家来到我的“新DOS时代”网站,里面有各类DOS软件和资料,地址:
http://wendos.mycool.net/

E-Mail & MSN: wengierwu AT hotmail.com (最近比较忙,有事请联系DOSroot和雨露,谢谢!)

Floor 4 Posted 2003-05-26 00:00 ·  中国 贵州 贵阳 电信
初级用户
Credits 123
Posts 4
Joined 2003-05-21 00:00
23-year member
UID 2305
Gender Male
Status Offline
Take a look and see whether there are any mistakes~ things like that~!
Can it be made a bit better~
Forum Jump: