We have a batch file where we have a variable %FileName which is set eg. to D:\dir\test.txt. We want to get the path without the filename eg. D:\dir\ out of the variable %FileName.
How could we do that using FOR and %~pI in our batch script???
Many thanks in advance!