2017-09-15 32 views

回答

3

您應該簡單地檢查文件是否存在,而不是擊中錯誤的。即:

local lcFile 
lcFile = "c:\my path\my file.ext" 
if file(m.lcFile) 
    * do whatever with the file 
endif 

你也可以在「出錯」或「try-catch」塊中包裝錯誤。即:

* With On Error 
on error note 
Use myNonExistentFile 
on error 

* with try-catch 
Try 
    Use myNonExistentFile 
Catch 
Endtry 
+0

謝謝你的回答,這是有幫助的。 – Denis

相關問題