Yes... that sounds like the usual mess that .pif files make... Your PWD (in Unixes, that's Present Working Directory, or the bit before the chevron on the standard command line prompt.) is not the same directory as the batch file, and sql files.
I open a command prompt in the extracted folder, and run the command from there. That way, I could pop the batch file in the system search path and run it in any folder where the SQL files are, so I could have a different set of SQL files... not that I can think of any good reason to do that right now.
Perhaps using that nasty %~dp0 would work well for you? That should be the drive and path to the batch file without the scripts name or extension... regardless of it's name length.
But for my money, if you want something you can just double click on, a GUI version of this batch file that takes the parameters from text boxes built as an exe would be the way to go.
This batch was written for someone who is as comfortable using the CLI (DOS prompt) as Explorer... AKA me. But I know that's not a popular idea these days.
Hang tight and I'll re-code it with AutoIt, for non-CLI use. ;)
I'm just adding a post because I've descovered that you can (apparently) replace SQLCMD with ISQL (ODBC access) or OSQL (DB API access) if you are using an older version of MS-SQL. (Version 2000?).
I can't try this out, so I'm not going to release it as such... but if you need to do this on an older SQL, it sounds like the modifications would be very easy.
I only discovered this as I'm working on the GUI version. And it may be useful to some people who have an existing SQL server setup.
----Edit----
GUI version is now released here. Please try it out and let me know if it isn't easier to get working. :D:
Okay... Bump to illustrate that there is a new version of the batch file available too.
This should fix DarkKnightH20s' problem with the paths, and allow you to just double click it and input the required details at prompts from the console.
I found some "official" documentation on %~ parameter modifiers on this page so I'm happier to use them more freely now. :D:
--- EDIT ---
That wasn't clear was it, %~dp0 is the full D)rive and P)ath of parameter 0, which is the batch file. Regardless of the present working directory. ;)

