I have a batch file located in several folders and in this file I need to replace the old subst T: . command for net use because the units (drives) have different properties in windows 7.
However, I have only found that net use only allows for absolute paths such as:
net use T: \\path\to\folder
I cannot work with absolute paths, but net use T: . is not allowed (it throws an error).
Is there a way to execute the net use command from a folder so that it uses the current .bat directory?
I think the best solution for me it would be to be able to get the absolute qualified path (\path\to\folder) with a batch command. (%cd% and chdir variables do not work in this case). Questions about getting the current directory or folder name are not useful since the net usecommand does not allow paths such as x:\path\to\folder