#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2008
    Location
    CA
    Posts
    258
    Rep Power
    56

    Where can I find Dos/Batch scripts


    for admin tasks, such as backing up a laptop, assigning network drives at login, etc? I looked on scripts.com and didn't see anything.

    Thank you.
  2. #2
  3. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2007
    Location
    NJ, USA
    Posts
    75
    Rep Power
    48
    Originally Posted by CallowAdmin
    for admin tasks, such as backing up a laptop, assigning network drives at login, etc? I looked on scripts.com and didn't see anything.

    Thank you.
    You can 'roll your own'. Here is a backupdb.bat file I wrote to run once a week using the Windows "Scheduled Task Wizard":

    Code:
    echo off
    echo ..
    echo ...
    echo .. PSP DB Backup Utility
    echo .. Created 05.12.29 by T Cosmas
    echo .. Updated 01.27.06
    echo .. Please wait while backup copies are made.
    echo .. This may take a couple of minutes.
    echo ...
    echo ..
    
    rem Check for backup copies
    if NOT exist pspdb2003_1.mdb goto copy1
    if NOT exist pspdb2003_2.mdb goto copy2
    if NOT exist pspdb2003_3.mdb goto copy3
    if NOT exist pspdb2003_4.mdb goto copy4
    
    :rencopy4
    del pspdb2003_4.mdb
    del pspusers_4.mdw
    echo .. deleted old copy
    
    :copy4
    ren pspdb2003_3.mdb pspdb2003_4.mdb
    ren pspusers_3.mdw pspusers_4.mdw
    echo .. renamed old copy 4
    
    :copy3
    ren pspdb2003_2.mdb pspdb2003_3.mdb
    ren pspusers_2.mdw pspusers_3.mdw
    echo .. renamed old copy 3
    
    :copy2
    ren pspdb2003_1.mdb pspdb2003_2.mdb
    ren pspusers_1.mdw pspusers_2.mdw
    echo .. renamed old copy 2
    
    :copy1
    copy ..\pspdb2003\pspdb2003.mdb pspdb2003_1.mdb
    copy ..\pspdb2003\pspusers.mdw pspusers_1.mdw
    echo .. renamed old copy 1
    
    :end
    echo Done!
    This script allows you to have four (4) backup copies of the files. Of course, this is a very simplistic copy routine. What you may really want to look into is software that'll do incremental backups and syncronization of files so that you always have the latest version on the laptop and in the backup directory as well as the prvious version(s).

    As for Drive Mapping, here is a script I found through a search (I would think your LAN software would provide a sample login script to do something similar):

    Code:
    Rem Batch  File for user John Doe
    NET USE Q: \\sbs1\Quickbooks
    NET USE S: \\sbs1\SharedCompany
    NET USE T: \\sbs1\Access
    Hope this is helpful!
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2008
    Location
    CA
    Posts
    258
    Rep Power
    56
    Hey thanks.

IMN logo majestic logo threadwatch logo seochat tools logo