Question: The next script will be creating a backup script . In order to do this you will need to determine what files you want to

The next script will be creating a backup script. In order to do this you will need to determine what files you want to backup, and the destination. You may want to backup school files, pictures, important documents, and so on. The files you will backup will need to be in a specific folder (i.e., C:\Users\Susie\Documents\Files). Then you will need a separate place to backup your data. It could be a separate folder on your C: drive, or it could be an external drive or usb drive.

You will also give your backup folder a custom name with the date. However, to do this you will need to strip out the / signs in the date. If you keep the / signs in the date then when you create your backup

So we need to strip out the month, day, and year. We do this by extracting a position and number of characters. So this command: %date:~4,2% will start at the 4th character and extract two characters

with the result of 07. To pull out the month, day, and year, use the following command. %date:~4,2%%date:~7,2%%date:~10,4%

We will use this to create our backup folder name.

Next, we will use the xcopy command to copy all files and subdirectories. The xcopy command works like this: xcopy source destination

So if you want to copy files from your C:\users\gina\Documents\work\ to your E:\backup (E: is the USB drive in this case) you would use this command: xcopy C:\users\gina\Documents\work\* E:\backup\* /S /Y /I

Note the switch S will copy all files and folders including subfolders, Y will overwrite files and not ask for confirmation, I will automatically create subfolders.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!