Wednesday, June 3, 2009

Keeping track of station numbers with a text file

rem Usually I keep track of the configurations associated with a station by its mac
rem Without the macs, one can keep track of what configuration to use by using a counter
rem
rem This works well with a network or a flash drive


for /f %%a in ('type \\server\share\count.txt') do SET temp=%%a
rem echo %temp%
SET /A temp+=1
echo %temp% > \\server\share\count.txt

rem The counts of count.txt is simply a number and can be used in a script

No comments: