Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!rice!uupsi!sunic!dkuug!imada!micro From: micro@imada.ou.dk (Klaus Pedersen) Newsgroups: comp.sys.atari.st.tech Subject: Re: What path was I executed from? Message-ID: <1991Jun20.122719.8147@imada.ou.dk> Date: 20 Jun 91 12:27:19 GMT References: <1991Jun17.215440.10349@d.cs.okstate.edu> Sender: news@imada.ou.dk (USENET News System) Organization: Dept. of Math. & Computer Science, Odense University, Denmark Lines: 23 cummins@d.cs.okstate.edu (John Cummins) writes: >How can my program find the path it was executed from if it's not >executed from the current directory? If it is a GEM program, you can use shel_read(), to get the full path, - at least in TOS>=1.4. >for example: > A BBS program (C:\bbs\bbs.tos) calls a door program >(C:\bbs\doors\door1\door1.tos). I want the door program to be able to find >it's related datafiles (located in the same directory as the door1.tos file) Again if the program is a GEM program, and it was started with shel_write, as from the desktop, you can use shel_find() to get the path of the files. >Seems to me this is somewhat like opening a window to a program/.rsc file, >then opening a second window, executing the program in the un-topped window >by ... holding down the right mouse button and then double clicking. The .rsc file will be found, as well as other files, that shel_find() gives you the path to... Klaus (micro@imada.ou.dk)