Today an accident, I wrote the diary of the big half month the encrypted file is damaged and cannot be recovered. He decided to write a dedicated backup script file.
The main idea is to create a folder under current directory backup based on today's date, and then copy the files to that folder.
The script files are as follows:
Copy Code code as follows:
echo off
Echo ******** starts backing up log files ********
Set ymd=%date:~0,4%%date:~5,2%%date:~8,2%
Set backup-dir=backupnotebook-%ymd%
Echo Backup directory:%backup-dir%
Echo--------------------------------
If not exist%backup-dir% (
mkdir%backup-dir%
)
Copy *.NB%backup-dir%
echo ********* log backup complete!*********
Pause
The script will be executed automatically every time the journal is finished.
With this script, I believe that there will be no similar problems in the future!