|
| |
|
Easy Directory Backup |
|
|
date /t
time /t
vol d:
rd /s/q "D:\Abbydale Systems\"
if exist "D:\Abbydale Systems\" rd /s /q "D:\Abbydale Systems\"
mkdir "D:\Abbydale Systems\"
xcopy "C:\Abbydale Systems" "D:\Abbydale Systems\" /Y/Q/S/R
|
The commands should be written into a batch (.bat) file and then you can either run it by clicking on the
filename or you could schedule the batch file to run.
The script can be replicated and many directories backed up at the same time. The first three lines of the script simply show the
date, time and volume name of the drive that will receive the backup. This is useful if you pipe the output
into another file and also if you flip flop backups between more than one drive.
The next line deletes the
target directory (the one that will be written to). Notice that in this case we are backing up files from the C drive to
a removable D drive. You could also backup to a network drive if desired. Notice that if the directory name contains
space you need to enclose the entire name in quotes.
The next statement also issues a delete for the target directory
as for some unknown reason if the target directory isn't empty Windows doesn't delete it, however the second one
will. Don't ask, we don't know, but it works fine!
The next statement creates the new target directory.
Finally the last statement, xcopy, copies all the files and subdirectories from the source directory to the target directory
To see a demonstration on how to schedule a backup task under Windows™ 10 please click
here.
|
|
|
To pipe output from the script into a file simply code: >C://your preferred directory/your output file after the command to run the script.
For a downloadable version of the above script click here.
For a more extensive list of user directories to be backed up click here.
|
|
|
| |
|
Maintaining A Rolling Directory Backup |
|
|
date /t
time /t
vol d:
rd /s/q "K:\Abbydale Systems(2)\"
if exist "K:\Abbydale Systems(2)\" rd /s /q "K:\Abbydale Systems(2)\"
mkdir "K:\Abbydale Systems(2)\"
xcopy "K:\Abbydale Systems" "K:\Abbydale Systems(2)\" /Y/Q/S/R
rd /s/q "K:\Abbydale Systems\"
if exist "K:\Abbydale Systems\" rd /s /q "K:\Abbydale Systems\"
mkdir "K:\Abbydale Systems\"
xcopy "C:\Abbydale Systems" "K:\Abbydale Systems\" /Y/Q/S/R
|
As with the script above these commands should be written into a batch (.bat) file and then you can either run it by clicking on the
filename or you could schedule the batch file to run.
This script basically maintains two generations of the 'Abbydale Systems' directory. On our systems this basically maintains
two week backup as we run the script weekly.
Most of the command used are described above and so we won't repeat them here.
A skeleton copy of the script is available here.
You will need to change the source and target directories to reflect your requirements.
| |
|
To pipe output from the script into a file simply code: >C://your preferred directory/your output file after the command to run the script
|
|
|
| |
|
Bulk Rename Of Files |
|
|
For a demonstration of how to perform bulk
renames in Windows.
Click here.
|
To perform a bulk rename in Windows you first need to open the directory in which the files are located using Windows Explorer
(Not Internet Explorer!).
Next select the files you want to rename. Use the shift and/or the Ctrl key to select multiple files.
Right click the mouse on one of the selected files.
Navigate to the rename option.
Change the old name to the desired name and then press enter.
All the selected files will now have the assigned name and they will be suffixed with a (n).
That is it! |
|
|
| |