How to Find the Current Directory in a Batch File in WindowsPublished: 29 September 2017 | Written by some jerk | Print | Email | Hits: 227 %cd% will give you the current working directory (variable) %~dp0 will give you the full path to the directory the batch file is in (static) %~dpnx0 (which is equivalent to %~f0) gives the full path to the batch file Prev Next