"Greg Stigers" <gregstigers+> wrote in message
news:#...
> I'm using %~dP0 to identify the path from which a batch file is run. I
> need to write a log, up two levels, and then down two folders. And I need
> to let the user know exactly where that is.
>
> I can code %~dP0..\..\dir\subdir, but don't expect the user to understand
> what that means. I've toyed with a couple of ideas, all kludgy and obtuse.
> Is there a way way to do this, that isn't ugly?
> ______
> Greg Stigers, MCSE
> remember to vote for the answers you like
This should do the trick for you, assuming that the batch file is being run
from a real or mapped drive rather than from a UNC:
pushd %~dP0..\..\dir\subdir
(set logFileFolder=%cd%)
popd
echo/look for the log file here: "%lofFileFolder%"
/Al
|