Jump to content

working around a timeout


Recommended Posts

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...