Windows uses bat files to back up files regularly

Source: Internet
Author: User

When you encounter a requirement, you need to back up the Access database, and the data generated by access is saved in the Xx.mdb file, so consider using a Windows task

Periodically execute a backup file of the bat file to resolve this issue.

backup.bat file Code:
@echo OffSet nowdate=%date:~,copy E:\Testing\Demo\backup\data.mdb d:\%nowdate:/=-%. Mdb

The above code translates the Data.mdb file under the "E:\Testing\Demo\backup" directory to the "D disk" root directory and names the file with the current date.

Create a scheduled task

After you create the bat file, double-click Execute to back up the Data.mdb. Create a task from Computer Management-Task Scheduler-Follow the prompts

You can implement scheduled backup files.

other

If you need to back up to another machine on your local area network, you need to share the destination folder directory first, and $ for implicit sharing.

@echo OffSet nowdate=%date:~,copy E:\Testing\Demo\backup\data.mdb \192.168 . 1.110\e$\work\%nowdate:/=-%.mdb

Other types of file backups are the same.

Windows uses bat files to back up files regularly

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.