No.
"~" syntax is only used with IIS (and similar web hosting software) as the root directory of the current web application. It is not available outside IIS.
You can always create the batch file appropriately for each system by writing the batc file from inside you website, and using "~" there:
string setRoot = string.Format("SET ROOTDIR=\"{0}\"\n", Server.MapPath("~"));