#Windows directory under the file to the specified backup data
(1) Create a text file
OFF echo
echo ------------------ start the backup log files ------------------
the SET ymd =% DATE: ~ %% DATE 0,4: 5,2 ~ %% DATE: ~ 8,2%
SET-backup the dir = C: \ RTXdbbackup \ rtxdb-% YMD%
echo backup directory:%% backup the dir-
echo ----- ---------------------------------------------
IF not exist% Backup % -dir (
mkdir% Backup the dir-%
)
echo F|xcopy /i /y "C:\Program Files (x86)\Tencent\RTXServer\db\rtxdb.mdb" %backup-dir%
echo ------------------ log backup is complete! ------------------
STOP
Parameter Description:
/ S Copies directories and subdirectories except empty.
/ E Copies directories and subdirectories, including empty ones. And / S / same E. It can be used to modify / T.
/ Display the full source and destination file name F copied.
/ R rewrite read-only file.
/ Y Suppresses prompting to confirm overwrite an existing destination file.
/ I If destination does not exist and copying more than one file, assumes that destination must be a directory.
(2) modify the text file name suffix .bat
(3) adding tasks
Start - Control Panel - Administrative Tools - Task Scheduler - Create a task - Specify script - Add the trigger you choose the times