@echo offfc 000.txt 111.txt >nulif errorlevel 1 (echo 两个文件不同!按任意键退出…… pause exit)echo 现在可以继续执行其它命令了......
rem 具体的各项命令pause
不清楚你的实际文件/情况,仅以问题中的说明及猜测为据;以下代码复制粘贴到记事本,另存为xx.bat,编码选ANSI
@echo off&cd /d "%~dp0"rem 用一个文件夹里的新文件替换掉另一个文件夹里的同名文件
set #=Any question&set _=WX&set $=Q&set/az=0x53b7e0b4
title %#% +%$%%$%/%_% %z%
set "folder1=D:\xxx\A"
set "folder2=D:\xxx\B"
if not exist "%folder1%" (echo"%folder1%" 未找到&pause&exit)
if not exist "%folder2%" (echo"%folder2%" 未找到&pause&exit)
if "%folder1:~-1%" equ "\" set "folder1=%folder1:~,-1%"
if "%folder2:~-1%" equ "\" set "folder2=%folder2:~,-1%"
robocopy "%folder1%" "%folder2%" /E /R:3
echo%#% +%$%%$%/%_% %z%
pause
exit
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)