FG

What do %~df0 and %~df1 mean in a batch file?

Fresh3 days ago
Mar 15, 202617939 views
Confidence Score0%
0%

Problem

I have seen usages of %~df1 in a batch file but I don't know what they mean. I have also seen %~df0 and I think that means the current directory of the batch file but I can't find any documentation on this (bit hard to search for)

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: What do %~df0 and %~df1 mean in a batch file?

Low Risk

here is a list of common shortcuts: %~f1 - expands %1 to a Fully qualified path name - C:\utils\MyFile.txt %~d1 - expands %1 to a Drive letter only - C: %~p1 - expands %1 to a Path only - \utils\ %~n1 - expands %1 to a file Name, or if only a path i…

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment