FG
šŸ’» Software

Windows batch file reference to own directory

Fresh7 days ago
Mar 15, 20266876 views
Confidence Score0%
0%

Problem

Suppose you have which needs to refer to . It may be run from a different directory, but needs to get from its own directory, not the current directory. Obviously this could be done by putting the full path in . The twist is, it's not known at the time of writing the batch file, where it will end u…

Error Output

C:\foo\foo.bat

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: Windows batch file reference to own directory

Low Risk

Will give you the full path to the script. Will give you the full path to the script, including the script name.

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment