WAD Different value for %~dpfsI in TCC/LE

  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
#1
Analyzing a batch file which isn't working in TCC/LE I've observed it gets different values for %~dpfsI
c:\Temp>ver

Microsoft Windows [Version 6.1.7601]

c:\Temp>for %I in ("c:\path\app\bin\..") do echo %~dpfsI
c:\path\app
[C:\Temp]ver

TCC LE 13.04.63 x64 Windows 7 [Version 6.1.7601]

[C:\Temp]for %I in ("c:\path\app\bin\..") do echo %~dpfsI
C:\path\C:\path\app
Could it be a bug or is considered OK?

Thank you.
 
#3
You are right, I should have checked documentation first (batch script is from an open source project and I just got the error on my PC).

It looks like cmd.exe is ignoring 'd' and 'p' and just applying 'f' (%~fsI) in the case they all three come together. Maybe it is a safer approach for wrong syntax, but not the straightforward one.

Thank you.