How to use a relative path in sqlcmd script Can someone tell me how to swap this absolute path with a relative one for my sqlcmd upgrade script?

-- how can I get rid of the following absolute path variable from my script?
:SETVAR ScriptDir "C:\absolutePath\"  

:SETVAR DeployLog "upgradeDb.out.log"
:SETVAR ErrorLog "upgradeDb.err.log"
:Error $(ScriptDir)$(ErrorLog)
:OUT $(ScriptDir)$(DeployLog)

:ON ERROR EXIT
print ' run scripts a and b'
:r $(ScriptDir)"a.sql"
:r $(ScriptDir)"b.sql"

PRINT 'finished'
GO

:EXIT 
print 'problem...'
GO


Originally posted (in the wrong place) here: https://softwareengineering.stackexchange.com/questions/318033/how-to-use-a-relative-path-in-sqlcmd-script
If you want a relative path, just use relative path notation.
:SETVAR ScriptDir "../../"

That will set your ScriptDir to two directories higher than wherever you invoked sqlcmd from.

or 
:SETVAR ScriptDir "moo/oink/bah/"

That will look for scripts in the moo/oink/bah subdirectory of wherever you invoked sqlcmd from.