Beyondexec Network Defrag Batch Files
I am using the Beyondexec (BeyondExec - Spawn Processes or Shutdown Remote Windows NT/2000/XP WorkStations) program, Batch Files and Windows Scheduling on a server to Defrag Machines on a network and to syncronise time on the workstations with the server.
I have created two batch files to do this which contain the commands:
D:\upload\beyondexecv2.exe \\ICT-01 defrag c: -f
D:\upload\beyondexecv2.exe \\ICT-02 defrag c: -f
D:\upload\beyondexecv2.exe \\ICT-03 defrag c: -f
D:\upload\beyondexecv2.exe \\ICT-04 defrag c: -f
D:\upload\beyondexecv2.exe \\ICT-05 defrag c: -f
etc... and
D:\upload\beyondexecv2.exe \\ICT-01 -s net time \\server01 /set /yes
D:\upload\beyondexecv2.exe \\ICT-02 -s net time \\server01 /set /yes
D:\upload\beyondexecv2.exe \\ICT-03 -s net time \\server01 /set /yes
D:\upload\beyondexecv2.exe \\ICT-04 -s net time \\server01 /set /yes
D:\upload\beyondexecv2.exe \\ICT-05 -s net time \\server01 /set /yes
There are two problems with this.
1. It only defrags one machine at a time, before starting the defrag on the next machine.
2. If the name of a machine is changed on the network, or another machine is added, that Batch files need to be changed.
I was wondering if there is some way of using beyondexec with a variable, so I can have a file with all the station names inside a seperate file such as "stations.txt", so I just need to update the one file with all the station names. I was also wondering if there is a way to make the program defrag all machines at the same time, rather than just one at a time.
If anyone could help I would be very grateful.