Is there a Windows command line command that I can use to get the full path to the current working directory?
Also, how can I store this path inside a variable used in a batch file?
Is there a Windows command line command that I can use to get the full path to the current working directory?
Also, how can I store this path inside a variable used in a batch file?
You can set a batch/environment variable as follows:
sample screenshot from a Windows 7 x64 cmd.exe.
Update: if you do a
SET var = %cd%
instead ofSET var=%cd%
, below is what happens. Thanks to jeb.Capturing the current directory from a batch file