Thursday, January 20, 2011

Create Batch file for laptops to copy templates

Hi Everyone,

I am new to batch file programming and need an expert help to find out something. I want to create a batch file that runs at login and compares a local copy of the templates to what we have on the network. We have templates on a mapped network drive in h:\clients\templates, and on the laptop in c:\apps\data\clients\templates. When the laptop is offline it substitutes c:\apps\data to appear as h: drive, that way the files appear to be in h:\clients\templates. Here’s the basic steps what I need the batch file for:

  1. first it checks to see if the computer is on the network
  2. if it’s online it copies any newer files from Server onto the local drive
  3. if it’s not online it uses the local files and has them show up on the laptop as the same location as the network

I really appreciate any help/suggestions..

Thank you in advance, Hemal

  • Wouldn't it be much easier to use Windows Offline Folders to give you this behaviour automatically?

    Hemal : It should also point the templates to the same location as my network drive as our application looks for the network path for the templates....
    Zoredache : @Hemal, a properly configured Offline Folders setup should do that.
    From MikeyB

0 comments:

Post a Comment