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
Create a .bat
file under System32
, let us name it copypath.bat
the command to copy current path could be:
echo %cd% | clip
Explanation:
%cd%
will give you current path
CLIP
Description:
Redirects output of command line tools to the Windows clipboard.
This text output can then be pasted into other programs.
Parameter List:
/? Displays this help message.
Examples:
DIR | CLIP Places a copy of the current directory
listing into the Windows clipboard.
CLIP < README.TXT Places a copy of the text from readme.txt
on to the Windows clipboard.
Now copyclip
is available from everywhere.