I am trying to write a batch file so I can use TortoiseHg Annotate from the IDE I’m using (VDF Studio). The IDE provides the file name in lowercase, but TortoiseHg requires the file name to be properly cased (e.g. the file could be stored as ‘C:\File.txt’, so TortoiseHg will not recognize ‘c:\file.txt’).
My batch file looks something like this:
thg annotate %1
I need some way to replace %1 (the given file) with a file name having proper casing.
Use
"%~f1", instead of%1.See the documentation of those »special« expansions in
help for(near the end).