Need to backup some machines d$\folders to a shared folder every day (Send mail after backup)


Need to backup some machines d$\folders to a shared folder every day (Send mail after backup).

I have a regular possess of backing up the managements Psts to a shared folder every day.
Is there a way a script can backup the files as mentioned in the backup file and send a mail after completion everyday as scheduled.

LVL 11
Who is Participating?
if you want to specify the source directory:

xcopy <destination>  <source>

XCOPY  /s/e/y  \\sourcePC\d$\*.pst     \\dev-chen-mrd100\c$      
@echo off

copy *.pst  \\server\folder

dir \\server\folder |  blat - -to -subject "Transferred files..."

Download blat here:

And do a:
blat -install  <mail server>  <username>

bsharathAuthor Commented:
Hi Harris,

I get this...

The process cannot access the file because it is being used by another process.
        0 file(s) copied.
Blat v2.6.2 w/GSS encryption (build : Feb 25 2007 12:06:19)

Failed to open registry key for Blat
To set the SMTP server's name/address and your username/email address for that
server machine do:
blat -install  server_name  your_email_address
or use '-server <server_name>' and '-f <your_email_address>'
aborting, nothing sent
Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

Oh... the pst files (emails) are currently in use.  Is there a time where outlook is closed so you can access the .pst files?  

Judging from the filename of the pst file...  SOPHOS is firewall/antivirus software.  I guess that is turned on all the time?  Let me check what else I can dig.

You need to setup the blat smtp configurations.

blat  -install    yourEmailServerHere     yourEmailAddressHere

before use.

How to automate the back up of .pst files with the Personal Folder Backup utility
Microsoft has released a utility to automate the backup of your personal folders (.pst) file. The utility can be downloaded from the following Microsoft Web site: 

For more information about the Personal Folder Backup utility, click the following article number to view the article in the Microsoft Knowledge Base:
238782 (
How to automatically backup your personal folders file
bsharathAuthor Commented:
Harris for a bat file like this.

@echo off

copy *.pst  \\dev-chen-mrd100\c$

dir \\dev-chen-mrd100\c$ |  blat - -to -subject "Transferred files..."

Where should i specify the destination path?
Hi bsharath --

destination path for your .pst files?

@echo off

::  let us use xcopy here for better copying.
::  copy all .pst files to destination \\dev-chen-mrd100\c$
XCOPY  /s/e/y *.pst  \\dev-chen-mrd100\c$              

::  get the list of files in the destination folder including sizes
::      sort by date descending (new files first)
::      and email it to for confirmation
dir /o-d /s \\dev-chen-mrd100\c$ |  blat - -to -subject "Transferred files..."
bsharathAuthor Commented:
Thanks harris.

The sam way to copy a folder what are the changes i need to do?
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.