Answer the question
In order to leave comments, you need to log in
Checking condition in bat command?
There is a simple script
@echo off
mkdir "Z:\1c_backup\Backup-%date:.=%"
xcopy /E "C:\1c_backup" "Z:\1c_backup\Backup-%date:.=%\"
TIMEOUT /T 2 /NOBREAK
rd /s /q "C:\1c_backup"
md "C:\1c_backup"
TIMEOUT /T 10 /NOBREAK
rd /s /q "C:\1c_backup"
mkdir "Z:\1c_backup\Backup-%date:.=%"
Answer the question
In order to leave comments, you need to log in
@echo off
set MYDIR="Z:\1c_backup\Backup-%date:.=%\"
mkdir %MYDIR%
echo xcopy /E "C:\1c_backup" %MYDIR%
TIMEOUT /T 2 /NOBREAK
IF NOT EXIST %MYDIR% exit 1
rd /s /q "C:\1c_backup"
md "C:\1c_backup"
TIMEOUT /T 10 /NOBREAK
Try
if exist Backup goto continue
if not exist Backup exit
or something like that
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question