We help IT Professionals succeed at work.


rcmtech204 used Ask the Experts™
I want to have a log on script that copies the user’s data to a share with out them knowing it every week around 3pm
I also want to make sure the script only runs if they are at their site so I want to make it specific to a certain IP range such as run if 192.168.2.x but don't run if it's 192.168.x.x
I only want to copy over Microsoft Office files and I want them to be incremental back ups. I would like to add this script to a GPO
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

I think the easy way to do this is enable sadow copy on the volume where the users data is.


I want to back up the work stations to the server
Are you looking at targeting a single directory such as My Documents or do you need to be able to get all Office documents copied off of the machines?

The robocopy command is capable of doing what you describe. It will copy specific files types as you wish and can do incremental and differential backup. You also want it run on specific machiones within a particular subnet. To do this, you will have to do some programming.

Another, thing you could try is to apply the GPO object to the specific O/U which contains the machines which you choose.

@echo off
::  this is a simple cmd script with conditional execution based on ip
::  sbexec.cmd
::  subnet exec by canali gastone
(ping %computername% -n 2 |find /i "TTL" |find "192.168.2." >nul) && call :_SITE1
(ping %computername% -n 2|find /i "TTL" |find "192.168." >nul)    && call :_SITE2
goto :_END

   echo  site 1 - subnet 192.168.2.x
   echo  ROBOCOPY  "C:\office\top secret"  "\\scv\reports" /ZB
goto :_EOF

   echo site 2 - subnet 192.168.x.x
   echo  do nothing
goto :_EOF
::::::::::::::::end script:::::::::::::::