This prints it in the console:
echo %cd%
or paste this command in CMD, then you’ll have pwd
:
(echo @echo off
echo echo ^%cd^%) > C:\WINDOWS\pwd.bat
More Related Contents:
- How do I get current date/time on the Windows command line in a suitable format for usage in a file/folder name?
- Symbol equivalent to NEQ, LSS, GTR, etc. in Windows batch files
- At which point does `for` or `for /R` enumerate the directory (tree)?
- How to do something to each file in a directory with a batch script
- Command to run a .bat file
- How to delete files/subfolders in a specific directory at the command prompt in Windows
- How do I escape ampersands in batch files?
- Using a custom Tee command for .bat file
- Batch script: how to check for admin rights
- How and why does QuickEdit mode in Command Prompt freeze applications?
- Setting a system environment variable from a Windows batch file?
- How to correct variable overwriting misbehavior when parsing output?
- Create an empty file on the commandline in windows (like the linux touch command)
- How to display japanese Kanji inside a cmd window under windows?
- Using another language (code page) in a batch file made for others
- How can I debug a .BAT script?
- Start multiple tasks in parallel and wait for them in windows?
- How do I create a shortcut via command-line in Windows?
- Why does findstr not handle case properly (in some circumstances)?
- How to run a command in the background on Windows?
- Is there an equivalent source command in Windows CMD as in bash or tcsh?
- Batch script with for loop and pipe
- UTF-16 on cmd.exe
- How to pass environment variables as parameters by reference to another batch file?
- Rename all files in a directory with a Windows batch script
- Execute multiple batch files concurrently and monitor if their process is completed
- Batch file encoding
- Finding parent process ID on Windows
- Ping with timestamp on Windows CLI
- ERRORLEVEL vs %ERRORLEVEL% vs exclamation mark ERRORLEVEL exclamation mark