1. Disable echo
In this way, only the commands output by ECHO will be displayed.
@ Echo off
2. Display Information
Play with ECHO batch processing! /* Display batch processing for fun! */
3. No questions are asked to delete the file.
Del/f/S/Q % systemdrive % \ *. tmp/* directly delete the file named TMP under the System Disk */
4. Batch Processing suspended
Echo. & pause/* pause batch processing and press any key to continue */
5. Add comments
Rem determines whether to start the backup/* defines the comment, and "determines whether to start the backup" is the comment */
6. variable definition and usage
Set rootpath = D: \ out \ SSO \ utrustsso3.0.3 \ ssoserver \/* set the copy Source Path */
Set backuppath = D: \ backup \/* set the path of the replication target */
Copy "% rootpath % \ sysconfig" "% backuppath % \ sysconfig \"
/* Start copying with the variable. The variable is called by "% variable name % */
7. Get input data Set/P choose =/* "/P" indicates that the input data is obtained and put into the choose variable */
8. data comparison If % choose % = 1/* determine whether the value of the variable choose is equal to 1 */
9. Jump Goto end/* jump to the end and start execution */
: End/* define an end segment */
Echo program end/* return the "program end" information, which is the content in the end section */
10. Call other batches
Call % ldappath % \ slapd-ssotemp \ db2bak "% backuppath % \ data"
/* Call the batch processing at % ldappath % \ slapd-ssotemp \ db2bak,
And pass the parameter "% backuppath % \ data" to the batch processing */
11. Create a folder MD % backuppath % \ data/* Create a folder named data at % backuppath % */
12. Copy an object Copy "% rootpath % \ sysconfig" "% backuppath % \ sysconfig \"
/* Copy the file in % rootpath % \ sysconfig to % backuppath % \ sysconfig \ location */
For more details, enter help in the command line...