- 帖子
- 18
- 积分
- 24
- 技术
- 0
- 捐助
- 0
- 注册时间
- 2011-5-9
|
编写了如下内容:
ECHO **** READ IP
for /f "tokens=15" %%i in ('ipconfig ^| find /i "ip address"') do set ip=%%i
@ECHO OFF&setlocal enableDelayedExpansion
set file=%date:~0,4%%date:~5,2%%date:~8,2%
set name=%date:~0,4%%date:~5,2%
set d=%date%
set t=%time:~0,-3%
echo ***** network
if exist S: net use S: /d /y > NUL:
if exist T: net use T: /d /y > NUL:
net use S: \\192.168.113.240\transfer_record "manta" /user:"mantauser"
IF ERRORLEVEL 1 goto errormsg
net use T: \\192.168.113.240\epat_data "manta" /user:"mantauser"
IF ERRORLEVEL 1 goto errormsg
if exist C:\ETT\ecelltest08 set equip=ecelltest08&goto Ecell08
exit
:ecell08
2>nul (for %%a in (d:\正常代码\*.*) do if "%%~xa"=="" set a=%%a&md T:\testcell\ecelltest08\正常代码\!a:~0,5!© "%%a" T:\testcell\ecelltest08\正常代码\!a:~0,5!)
xcopy D:\正常代码\*.* d:\backup\%name%\正常代码\ /s /y
rem xcopy D:\故障码\*.* T:\testcell\ecelltest08\%name%\ /s /y
IF ERRORLEVEL 1 goto end
rem erase D:\正常代码\ /s /f /q
echo %d% %t% ***%equip% IP:%IP%*** ecelltest08_dataupdate is finish! >>S:\ecelltest08.log
goto end
运行结果是:T:\testcell\ecelltest08\正常代码 目录下未建立成功文件夹,归档文件拷贝不成功,但是拷贝到d盘的backup没问题;
为什么啊? |
|