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

Posted on 2007-10-02
Last Modified: 2010-04-16

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.

Question by:bsharath
    LVL 8

    Expert Comment

    @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>

    LVL 11

    Author Comment

    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
    LVL 8

    Expert Comment

    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.

    LVL 8

    Expert Comment

    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
    LVL 11

    Author Comment

    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?
    LVL 8

    Expert Comment

    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..."
    LVL 8

    Accepted Solution

    if you want to specify the source directory:

    xcopy <destination>  <source>

    XCOPY  /s/e/y  \\sourcePC\d$\*.pst     \\dev-chen-mrd100\c$      
    LVL 11

    Author Comment

    Thanks harris.

    The sam way to copy a folder what are the changes i need to do?

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Suggested Solutions

    There is an easy way, in .NET, to centralize the treatment of all unexpected errors. First of all, instead of launching the application directly in a Form, you need first to write a Sub called Main, in a module. Then, set the Startup Object to th…
    Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
    The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
    In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now