>In this case WAIT WINDOW SYS(16,0) will give you your ANYNAME.EXE name. > >Nick
Cool! Haven't tried it yet but it looks good. Got this from the help:
This option is useful for recovering from errors. SYS(16) is similar to PROGRAM( ). However, SYS(16) returns a path with the program name; whereas PROGRAM( ) returns just the program name.
If a procedure or function is being executed, SYS(16) returns the name of the file containing the procedure or function after the procedure or function name.
As you might have guessed, I jumped to the conclusion that PROGRAM() and SYS(16) were the same function with different names.