I have a batch file which is in a directory and must be run from there as well because it updates files within this directory.
This works perfectly fine, except when t
You can CD directly from the file name by adding the parent (not tested in windows 8.x, but has worked "forever" as far as I can remember).
CD %FILENAME%\..
and CD will change drives as well using /D, which is shown above but not explicitly mentioned so might be missed. CD /D %FILENAME%\..
(FOR /? IF /? SET /? CALL /? GOTO /? all provide highly useful reading if you use cmd.exe, I reread them once in a while.)