How to get the current directory in which the file is running, using a window package?

I am not familiar with this programming language, in PHP it is getcwd().

+3
source share
1 answer

Not quite sure that I understand your question, but:

The current directory is stored in the pseudo-variable% CD%

Getting the directory where the batch file is located can be done as follows:

%~dp0 

% 0 is the name of the batch file. ~ dp gives you the drive and path to the specified argument.

+8
source

Source: https://habr.com/ru/post/1737485/


All Articles