gcue Posted June 9, 2008 Share Posted June 9, 2008 i have a script that checks the date on some files from a remote computer if it matches a date requested then it copies them to a temp file on the remote pc.. and then zips tehm up onto the pc running the script... script works great if the remote pc is within the same location (or the connection is fast) it seems its timing out for pcs that are on teh WAN, so the message box..."There were no log files dated" comes up. any ideas how i can get around the timeout? thanks For $X = 1 to $fileList[0] $Date = FileGetTime($source & "\" & $fileList[$X], 0, 0) $fDate = StringFormat("%s/%s/%s", $Date[1],$Date[2],$Date[0]) If $fDate = $date_request Then $stats=GUICtrlCreateLabel("Copying Logs...", 10, 40) FileCopy($source & "\" & $fileList[$X], $destination, 1) EndIf Next If Not FileExists($destination & "\rolling*.*") Then MsgBox(0, "ETP Logs", "There were no log files dated " & $date_request & " on " & $asset) Return EndIf Link to comment Share on other sites More sharing options...
Bert Posted June 9, 2008 Share Posted June 9, 2008 You could do a ping to see if the PC is there, then do $Date = FileGetTime($source & "\" & $fileList[$X], 0, 0 until $Date > 0 The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
gcue Posted June 9, 2008 Author Share Posted June 9, 2008 i tried it like this and it didnt work (if the machine didnt respond to a ping they wont get this far) For $X = 1 to $fileList[0] $Date = FileGetTime($source & "\" & $fileList[$X], 0, 0) $fDate = StringFormat("%s/%s/%s", $Date[1],$Date[2],$Date[0]) If $fDate = $date_request Then $stats=GUICtrlCreateLabel("Copying Logs...", 10, 40) Do $copy=FileCopy($source & "\" & $fileList[$X], $destination, 1) Until $copy > 0 EndIf Next Link to comment Share on other sites More sharing options...
gcue Posted June 9, 2008 Author Share Posted June 9, 2008 its def just a filecopy timeout wish there was a switch for persistent filecopying!! =/ Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now