ExecFile() not executing a file

Blitz3D Forums/Blitz3D Beginners Area/ExecFile() not executing a file

Blitzplotter(Posted 2006) [#1]
Has anybody experienced ExecFile() not executing a file when the pathname to the file in question appears to be spot on ? The executable in question runs successfully when the icon is double clicked ?


b32(Posted 2006) [#2]
maybe it is some kind of dos-type app? then you should either use ExecFile "cmd " + filename$ (xp) or
ExecFile "command " + filename$ (98)


Blitzplotter(Posted 2006) [#3]
It is a BB3d.exe . I have successfully executed the file form within my BB app prior to 'installing' my project. I have tried using the following to determine whether the confirmation that I am accessing the correct path within the application is not lieing to me:-

checkthere = FileType (filename$)
Text 5, 600, "The filetype is:- ", checkthere

checkthere is basically populated with a blank space character ? I would have thought it should be 0, 1 or 2 - I'm probably going syntactically wrong somewhere....

Ended up using a workaround:

prefilename$ = SystemProperty("AppDir")
filename$ = SystemProperty("AppDir") + "Results_Compare.exe"
;filename$ = resultzname$ WORKS
ChangeDir prefilename$
ExecFile "Results_Compare.exe"


b32(Posted 2006) [#4]
Could be the file cannot be found. Try
print filetype(filename$)
or
if filetype(filename$) = 1 then print "file exists"


TomToad(Posted 2006) [#5]
checkthere = FileType (filename$)
Text 5, 600, "The filetype is:- ", checkthere

Should be Text 5,600,"The filetype is:- "+checkthere


Blitzplotter(Posted 2006) [#6]
Thanks Tom, them syntax gremlins....


Sir Gak(Posted 2006) [#7]
Blitzplotter:
"don't eat yellow snow"
Don't??? Hmm, maybe that's why my winter snowcones have been tasting rather off lately. :)