hi
i have the following script which takes a server list, splits it up, maps a
drive to each server and checks the date last modified of a particular file
seems ok except for one strange issue
server1's file has a dlm of 11/04/05
server2's file has a dlm of 28/04/05
when i run the script it reports back the other way round. i.e. server1 as
28/04/05 and server2 as 11/04/05
the map.cmd command removes the current L: mapping and maps to servlist(x).
this is OK as i have generated an audit file from this and it maps the
correct way around (i.e. server1 first followed by server2)
any ideas?
cheers
option explicit
Dim WshShell, fso, file, lmdate, servfile, servlist(30), sl, x, y, server
set WshShell = createobject("wscript.shell")
set fso = createobject("scripting.filesystemobject")
set file = fso.getfile("L:\myfile.vbs")
set servfile = fso.opentextfile("serverlist.txt",1)
x = 0
Do While Not servfile.AtEndOfStream
sl = servfile.readline
servlist(x) = sl
x = x + 1
loop
y = x
x = 0
for x = 0 to eval(y-1)
wshshell.run "map.cmd "&servlist(x),true
lmdate = file.DateLastModified
lmdate = left(lmdate,10)
if lmdate = "11/04/2005" then
msgbox servlist(x)&" "&lmdate
else
msgbox servlist(x)&" wrong date"
end if
next