Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

script to check IP address and pipe to ms bakcup

Status
Not open for further replies.

UnaBomber

Technical User
Aug 10, 2003
166
GB
hey,

I am wondering if anyone can help.

I am wanting to create a script (cmd or bat) that checks the default gateway of a PC on logon, if this is equal to a defined variable (lets say 10.100.1.1) MS backup will open and perform a predefined backup job.

the reason why I am asking is to backup Laptops data to a LOCAL NAS device, only when the laptop is in its "home" subnet!

Any help or pointer in the right direction would be a big help

 
Why not check for the existence of the NAS device?

if exist h:\nul goto do_backup
goto end

:do_backup

...etc..

:end

 
The laptops dont ness. have drives mouted to the NAS. also we map drives via IP so if they are mounted they will always be mounted to the NAS regardless of physical location. Basically The only variable I can think of to start the backup job when the NAS is LOCAL would be to check the default gateway or network address.

thanks anyway :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top