windows open cmd in current folder code example Example: open cmd in current directory cd /d %~dp0 cmd.exe