Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Wait for a file in directory
#7
Function WaitForFileNotLocked
Code:
Copy      Help
;/
function $_file

opt waitmsg -1
Dir d
rep
,if d.dir(_file) and d.FileSize
,,__HFile f.Create(_file OPEN_EXISTING 0 FILE_SHARE_READ); err
,,if(f) f.Close; break
,0.5

example
Function wait_file2
Code:
Copy      Help
str s="D:\downloads\quickmac.exe"

WaitForFileNotLocked s

mes "downloaded"


Messages In This Thread

Forum Jump:


Users browsing this thread: 5 Guest(s)