DOS - PATH

About

PATH in dos may refer to:

  • the command
  • or to the path of a file.

Management

Command

The PATH command displays or sets a search path for executable files.

PATH

Relative to Qualified

How to transform a relative path to a qualified path

pushd .
cd /D %domainHome%..
SET domainHome=%CD%
popd

Get path information from a string

By using argument modifiers

  • Example with directory
set MY_PATH=C:\Hello\Nico

call :dir_name_from_path MY_DIR MY_PATH
echo %MY_DIR%

:dir_name_from_path <dir> <path>
(
    set "%~1=%~dp2"
    exit /b
)

Powered by ComboStrap