From: Sear S on
Tom,

Thanks a bunch! works very well
Please e-mail me your e-mail address at saam_sear(a)yahoo.com


Sam

"Tom Lavedas" wrote:

> On Jun 1, 7:56 am, Sear S <Se...(a)discussions.microsoft.com> wrote:
> > Hi Tom,
> >
> > So I guess I will have to create three different scripts to meet the
> > requirement of finding all 3 files since this one below doesn't work either!
> >
> That is a change from what I thought you were doing. I see now that
> there was an obvious logic error in my last posting, for which I
> apologize.
>
> Lets try again, though I think you may want to try working on this on
> your own, as I can only afford to spend a few minutes at a time on
> something like this. Since, it is your problem, you would probably
> have better luck applying the principles and fixing my logic bugs.
>
> For multiple files, I might try something like this ...
>
> sServerNameFile = "\\to8pal01\express\Sam\WSnames.txt"
> aLogNames = Array("ipc_err0.elg", "ipc_err1.elg", "ipc_err2.elg")
> sDestination = "\\to8pal01\express\Sam\Logs\"
> with createobject("scripting.filesystemobject")
> sServerNames = .OpenTextFile(sServerNameFile, 1).ReadAll
> for each server in split(sServerNames, vbNewLine)
> for each sLogName in aLogNames
> sLogPath = "\\" & server & "\C$\" & sLogName
> if .fileExists(sLogPath) then
> .copyfile slogPath, sDestination & server & sLogName
> end if
> next
> next
> end with
> _____________________
> Tom Lavedas
> .
>