When I do RESTORE FILELISTONLY FROM DISK = 'db.bak' I don't want to specify the path to the .bak file. Is there any way to do this? Something like '%CD%\db.bak'?! If I for example want to put MSDE, .bak and a script file (cmd) on a CD-r I want to install (and restore) the database from the current directory.
Thank you for the answer. I worked around the problem by copy the .bak file in the cmd script first thing before starting the osql script. Then I got the current directory and then I know exactly were the file is :-)