Batch Script Tips Leave a reply Getting the current working directory cd /d %~dp0 Comment: %0 is the name of the batch file. ~dp gives you the drive and path.