Isn't it '.\'? I mean, it's not as UNIX, in Windows you configure the directory used as current dir for a batch file, and by default it's the same where the file lives. So, you can work with ..\config etc reliably.
If I'm mistaken somebody correct me. I know no other way to know the batch file path. I suppose this is not enough for your needs, though. If you execute "cd" given this premise you get the current dir. To store this on a variable, set var=%cd% works on my system (win2k). Hope this helps. Ignacio. > -----Mensaje original----- > De: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]En nombre de Jason > Dillon > Enviado el: s�bado, 16 de febrero de 2002 1:30 > Para: Jboss-Development@Lists. Sourceforge. Net > Asunto: [JBoss-dev] Question for win32 batch file gurus > > > Is there any way to detect the directory in which a .bat file lives when > it is running? > > Like in sh, I can `dirname $0` to find out where the script lives. > > Is this possible? If so can some one show me the syntax? > > --jason > > > > > _______________________________________________ > Jboss-development mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-development > > _______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
