If you want to know the current location, in which folder or directory you are while using Windows CMD (Command Line Interface), you can make use of cd command,
Command: cd - This command can be used to displays the name of or to change the current directory.
D:\Games>cd D:\Games D:\Games>
If you want to print the current location in a Shell Script you can wrap the cd with percentage sign example %cd%,
D:\Games>echo "Current Location is %cd%" "Current Location is D:\Games"
@echo off set location=%cd% echo Your current dir is %location% pause
C:\Users\C2c\Desktop>sample.bat Your current dir is C:\Users\C2c\Desktop Press any key to continue . . .
- Cmd command get current directory location
- Grep Alternative for Windows CMD or PowerShell: findstr
- [Fix] Microsoft Windows Store error 0x00000005 (Windows 8/10/11)
- Read file from Windows CMD (Command Line)
- [Fix] Microsoft Windows OneDrive 0x8007018b Error Code
- sudo is not recognized as an internal or external command
- [Solution] The connection to the remote PC was lost, preparing to reconnect - Windows RDP
- Change the default diff or commit editor for git - Git
- Fix NVIDIA GeForce Experience ERROR CODE 0x0003 - HowTos
- #HappyBirthdayJimin hashtag trending on BTS Jimin 25th birthday [BTS ARMY] - BTS
- Gmail Unable to upload because it is a folder or a package (like an application bundle or RTFD document) - HowTos
- Mac OS X Taking Screen Capture using Terminal - Mac-OS-X
- Installation error: INSTALL_PARSE_FAILED_MANIFEST_MALFORMED - Android
- How to hide or disable iOS 14 App Library on iPhone? - Apple
- macOS Ventura XCode Command Line Tools Installation - MacOS