Backing up Directories and networked PCs using Batch File

You can backup other directories by simply creating more alike lines:

%backupcmd% “…source dir…” “%drive%\…destination dir…”

For example, if you’d like to backup “C:\Program Files\Microsoft Office” to our destination “G:\Backup\MS Office” (and retain the directory structure) you’d need to add the following line to the batch file:

%backupcmd% “C:\Program Files\Microsoft Office” “%drive%\MS Office”

Here is another example, backing up the Administrator Profile on a machine on the LAN with computer name “Lianli”:

%backupcmd% “\UserProfile\c\Documents and Settings\Administrator”  “%drive%\UserProfile - admin profile”

Remember, you have to save the batch file with either .bat or .cmd extension, then just double-click to execute it.

Leave a Reply

You must be logged in to post a comment.