Answer the question
In order to leave comments, you need to log in
How to designate a disk change when specifying a relative path?
C:\Documents\Newsletters\Summer2018.pdf The absolute path to the file from the root of the C: drive.
\Program Files\Custom Utilities\StringFinder.exe Absolute path from the root of the current drive.
2018\January.xlsx Relative path to a file in a subdirectory of the current directory.
..\Publications\TravelBrochure.pdf Relative path to a file in a directory that is a peer of the current directory.
C:\Projects\apilibrary\apilibrary.sln Absolute path to the file from the root of the C: drive.
C:Projects\apilibrary\apilibrary.sln Relative path from the current directory on drive C:.
The question arose when I tried to specify a relative path to a file located on another disk, how is it possible to specify a relative path to a file located on another disk?
Answer the question
In order to leave comments, you need to log in
For each disk, you can set your own working directory, for example, using the command CD
without the /D
; example:
cd h:\a\b\c
All relative (not from the root) paths for this drive will be expanded relative to this directory, i.e. will be expanded to h:d\e.doc
, h:\a\b\c\d\e.doc
but h:..\f.doc
to h:\a\b\f.doc
.
=D:
(D
— буква диска); и простой командой SET
стандартного обработчика командной строки Windows NT не выводятся, но если они определены, их можно увидеть в выводе командыSET ""
(или даже SET "
): To display undocumented system variables:— ss64.com/nt/set.html, см. также Rob van der Woude — Dynamic Environment Variables.
SET "
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question