Need to know if file exists on server.
Client program needs this info to proceed.
Tried FTP code in client program to loop and continually check for existence of file but is consumes bandwidth and ties up client processor.
Decided that client would call an asp and the asp would try for 10 seconds and send results back to client.
see code below;
<html><body><% serial=request.Querystring("Serial") Set fso = CreateObject("Scripting.FileSystemObject") starttime=timer filefound=false do while timer<starttime+10 '10 second delay if timer<starttime then exit do ' Midnight reset if fso.fileExists( server.mappath("\") & "\data\trims_net\" & serial & "\command.txt" ) then FileFound=true exit do end if loop if filefound then response.write( "FileFound") else response.write("TimeOut") end if Set fso = Nothing %></body></html>
Above code works BUT now I'm consuming server processing time -due to fact that I'm now in a loop on server or up to 10 seconds on each request.
I need a better way - any suggestions?
Lee