Hi everyone
So recently I programmed a small "model preview" program for my games so my modellers know what their models will look like when implemented. They didn't want to have to search for the files in the application so taking some good advice from a friend I made it a drag-and-drop thing. You drag your model file onto the EXE and that's it, the program opens it and displays it. This is done with the command
cl$().
So far so good, now here's the problem. The application requires some effect files which are placed in the same directory as the application. These fail to load when I drop a model file onto the application from a directory other than that of the application. The reason why? The current directory changes to the directory of the file you drop. Go try it out if you want. Just compile the code below and drop some random files onto the resulting EXE file, each from different directories. You'll see that the
get dir$() command changes every time.
print "file: ";cl$()
print "current dir: ";get dir$()
wait key
end
How do I find the directory of the EXE?
TheComet