• Home
  • All
  • ASCII
  • Health
    • Mental
  • Software
  • Tutorials
  • Graphics
    • Emoticons
Software How to Find the Current Directory in a Batch File in Windows

How to Find the Current Directory in a Batch File in Windows

Published: 29 September 2017 | Written by some jerk | Print | Email | Hits: 509
  • %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

Copyright © 2015. All Rights Reserved.