The following is a script i'm using to push updated files over my network. I keep getting an error that says "can't find path". Is there any way that when I run this, I can find out which loop iteration it is failing on? I could go to the reference file and just start changing computer names but if I can somehow ID the fail point, it could be useful in troubleshooting other scripting problems I may encounter. Also, is it possible to have the script skip the errored iteration and move on to the next loop?
[codebox]Const ForReading = 1
Const OverwriteExisting = TRUE
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile("C:\Computers.txt")
Do Until objFile.AtEndOfStream
strComputer = objFile.ReadLine
strRemoteFile = "\\" & strComputer & "\C$\PathToFolder"
objFSO.CopyFile "C:\transferring.file", strRemoteFile, OverwriteExisting
Loop
[/codebox]