Gents...If I was really doing this, I would probably keep a "master" version of the workstation config.sys on a centralized server share. Then leverage off the "comparefiletimes()" function to copy all revisions to the workstation.
Obviously this example only works when everyone gets the same config.sys, but you could build-in the smarts to handle differences based on user group or whatever.
Also, this gives the added benefit of being more generic and flexible and will run a whole lot faster !
code:
$server_config = "\\dn1cmp\image\config.nt"
$workstation_config = "c:\winnt\system32\config.nt"$rs = comparefiletimes ( $workstation_config, $server_config )
if $rs = -1
?"Copying new config..."
copy $server_config $workstation_config
else
?"Error or no action required..."
endif
exit
If you do decide to go with the parsing solution, I'd definitely recommend you implement kholm's improved version. It handles the case where there is no files=n line found !
Shawn.