Hi there
I need guidance or help please on the following script.
See below only a segment code which i need guidance for
Set objFSO = CreateObject("Scripting.FileSystemObject")
strTmpName = "Report.log"
Set objScript = objFSO.CreateTextFile(strTmpName)
arrComputers = Array("servernameA","servernameB","servernameC") ' If
you want to check multiple PCs
'arrComputers = Array("PC1") if you want to check one PC. It doesn’t
have to be an Array then..
For Each strComputer In arrComputers
objStartFolder = "\\" & strComputer & "\C$\Test\"
I have 2 questions really for the above segment code
1) The list of arguments i'm going to pass to array will be huge as it will have to search for about 100 servers. Is there a way i can pass this argument list on to a text file so that the script will read each line of the text as an array entry and continue with the program
2) objStartFolder = "\\" & strComputer & "\C$\Test\" Is there a way i can exclude certain folders to search so that it doesn't choke network. At the minute it is taking around 35 mins to
perform the search if i include "\C$\" rather than "\C$\Test\" .
Let me know if u need full script as i can't see these values being changed anywhere else other than this
I need guidance or help please on the following script.
See below only a segment code which i need guidance for
Set objFSO = CreateObject("Scripting.FileSystemObject")
strTmpName = "Report.log"
Set objScript = objFSO.CreateTextFile(strTmpName)
arrComputers = Array("servernameA","servernameB","servernameC") ' If
you want to check multiple PCs
'arrComputers = Array("PC1") if you want to check one PC. It doesn’t
have to be an Array then..
For Each strComputer In arrComputers
objStartFolder = "\\" & strComputer & "\C$\Test\"
I have 2 questions really for the above segment code
1) The list of arguments i'm going to pass to array will be huge as it will have to search for about 100 servers. Is there a way i can pass this argument list on to a text file so that the script will read each line of the text as an array entry and continue with the program
2) objStartFolder = "\\" & strComputer & "\C$\Test\" Is there a way i can exclude certain folders to search so that it doesn't choke network. At the minute it is taking around 35 mins to
perform the search if i include "\C$\" rather than "\C$\Test\" .
Let me know if u need full script as i can't see these values being changed anywhere else other than this