|
|
|||||||
EXIST ("C:\folder\file.ini") IF @ERROR = 1 MESSAGEBOX ("FILE FOUND", @ERROR, 0) ELSE MESSAGEBOX ("FILE NOT FOUND", @ERROR, 0) ENDIF Regardless of the file is there or not, @ERROR is always 0. I cut it down to the simplest setup, but I still cannot figure it out. @ERROR should be 1 at least with EXIST ("C:\*") but it is not. Whats wrong? Best regards, Henne |
||||||||
|
|
|||||||
It's the return code you are interested in, not the error, below is how you should do handle this Code: If EXIST ("C:\folder\file.ini") ;IF @ERROR = 1 MESSAGEBOX ("FILE FOUND", @ERROR, 0) ELSE MESSAGEBOX ("FILE NOT FOUND", @ERROR, 0) ENDIF |
||||||||
|
|
|||||||
Thats sounds easy :-) Thanks, Allen! I still do not understand the @ERROR function. Couldn't find anything useful in the manual either. |
||||||||
|
|
|||||||
Probably because you were looking in the wrong place. @Error is a macro, not a function. The "functions" section however describe what @Error returns under what circumstance. You also need to realize that MessageBox() will affect the @Error in unusual ways. I think there is a FAQ on that. |