How to read text files on remote servers without mapping/unmapping drives?
- From: Hoa.Hoa.Nguyen@xxxxxxxxx
- Date: Wed, 19 Mar 2008 13:28:56 -0700 (PDT)
1) We have a script that maps and unmaps drives.
This script is an audit script. So it is called say from Box1 to
BoxA, BoxB, BoxZ etc...
To find out where BoxA-BoxZ have been running backups, the script
interrogates
the backup logs on BoxA-BoxZ.
To read the BoxA-BoxZ the script maps a drive ( V: in this instance)
objNetwork.MapNetworkDrive "V:", "\\" & strComputer & "\" & "C$", ,
strUser, strPwd
and open to read the back up logs
strFilePath = "V:\Program Files\Tivoli\TSM\baclient
\dsmsched.log"
When finished the drive gets disconnected/unmapped.
If there multiple script jobs running concurrently, this could be a
problem as there could be a job querying the log file as the volume
could have been dismounted from another job.
What would be the best way to read the log on a server without
mounting the drives?
2) Another reason for mounting the drives,
there are some windows commands like "ipconfig" we usually run the
command, save as a text file
errReturn = objProc.Create ("cmd.exe /c ipconfig > C:\temp
\ipview.txt", Null, Null, intPID)
Is there a better way of executing command and read the output
directly without having to creating an extra file?
.
- Follow-Ups:
- RE: How to read text files on remote servers without mapping/unmapping
- From: Corey Thomas - MCSE/MCSA/MCDBA
- Re: How to read text files on remote servers without mapping/unmapping drives?
- From: Pegasus \(MVP\)
- RE: How to read text files on remote servers without mapping/unmapping
- Prev by Date: Re: Line Spacing
- Next by Date: Re: Line Spacing
- Previous by thread: WMI and Joining Domain (sysprep related)
- Next by thread: Re: How to read text files on remote servers without mapping/unmapping drives?
- Index(es):
Relevant Pages
|