Jump to content

Recommended Posts

Posted

Here it is...

 

@echo off
title SPCTracker Archive Script
echo.
echo This batch script is archiving the days logfiles from SPCTracker.
echo.

echo.
echo Access Physical Server Archive Location
echo.
D:
cd \
cd SPCTracker
cd Archive
echo.
echo Begin Archive Structuring for Day
echo.
md "%date:/=-%"
cd "%date:/=-%"
md "Users"
md "Computers"
echo.
echo Back up to SPCTracker Root
echo.
cd ..
cd ..
echo.
echo Start Copying Users Logfiles
echo.
cd Users
move *.* "../Archive/%date:/=-%/Users/"
cd ..
echo.
echo Start Copying Computers Logfiles
echo.
cd Computers
move *.* "../Archive/%date:/=-%/Computers/"
cd ..
echo.
echo Process Complete!
echo.
exit

 

Make sure you change the physical server archive location in the script appropriately - Drive:\Folder[...]\Archive

 

You'll need to manually create the Archive folder within the root of your Record Logons folder otherwise it'll all get very messy.

 

I find at the end of each month it's best to grab all of the months folders and then archive them manually into folders like:

 

2009_01 (Jan)

2009_02 (Feb)

2009_03 (Mar)

 

etc

  • Thanks 1
  • 5 weeks later...
Posted

The scripts posted by tosh74 and Neoplosive were almost exactly what I needed! thanks!

 

Quick question, has anyone added another field thats logged for the IP address?

 

I know its beyond me unfourtuantely!

  • 1 year later...
Posted

we use these lines in our login script

rem LOG USER AND IP======================================================================================
@for /f "tokens=2* delims=:. " %%a in ('ipconfig ^| find /i "ip address"') do Echo %date%,%time%,%username%,'%computername%,%%b >>k:\ICTtech\TechlogIP.txt
rem =====================================================================================================

Posted

I made my own, Login Tracker, using VBScripts and PHP/MySQL.

 

Info and Download.

 

v2 is a work in progress and will encompass a much-improved UI (like this). I'm also debating over using CouchDB instead of/as well as MySQL for data storage.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...