|Stated the ~ modifier applies to external and internal variables only, i.e. those on the command tail referred as %1, %2 and so on and those coded in FOR loops as %%a, %%b..., the %~ without other nodifiers forces to strip out the double quotes embracing the operand. Example:|
mybat "C:\Program Files\SuperTools"
may be read inside the batch by coding
resulting in Folder set to C:\Program Files\SuperTools. To know more type FOR /? and read the list of allowed modifiers at the bottom of the quick help.