I need to print current directory name after CD command.
Is it possible to do? Thanks!
echo off echo. echo This batch program deletes some files echo. pause cd "D:\Folder1\" pause
MS-DOS and Windows command line current directory To list the files in the current directory use the dir command, and if you want to change the current directory, use the cd command. You can use the chdir command by itself to print the current directory in MS-DOS and the Windows command line.
In a Windows command prompt, chdir or cd will print the full path of the current working directory in the console.
To determine the exact location of the current directory at a shell prompt and type the command pwd. This example shows that you are in the user sam's directory, which is in the /home/ directory. The command pwd stands for print working directory.
Use the pwd command to write to standard output the full path name of your current directory (from the /(root) directory). All directories are separated by a slash (/).
Just use cd
with no arguments supplied. From cd /?
:
Type CD without parameters to display the current drive and directory.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With