“Dapatkan Batch Direktori Saat Ini” Kode Jawaban

Direktori saat ini kelelawar

From within your batch file:

%cd% refers to the current working directory (variable)
%~dp0 refers to the full path to the batch file's directory (static)
%~dpnx0 and %~f0 both refer to the full path to the batch directory and file name (static).
Bright Bug

direktori batch

echo [current working directory]     :     %%cd%%       :      %cd%     
echo [batch folder path]             :     %%~dp0      :      %~dp0     
echo [batch files fullpath]          :     %%~dpnx0    :      %~dpnx0
echo [batch files fullpath]          :     %%~f0       :      %~f0

REM # | OUTPUT EXAMPLE
REM # | [current working directory] : %cd%     :  G:\DynamicWorkingDirectory
REM # | [batch folder path]         : %~dp0    :  G:\Deletable\
REM # | [batch files fullpath]      : %~dpnx0  :  G:\Deletable\01_Basic.bat
REM # | [batch files fullpath]      : %~f0     :  G:\Deletable\01_Basic.bat
Jacques_Kirstein

direktori saat ini dalam file batch

Use this
%cd% ---> shows current working directory of the command window.
Outstanding Lioncatcher

Dapatkan Batch Direktori Saat Ini

%cd% refers to the current working directory (variable)
%~dp0 refers to the full path to the batch file's directory (static)
%~dpnx0 and %~f0 both refer to the full path to the batch directory and file name (static).
Muddy Moose

Jawaban yang mirip dengan “Dapatkan Batch Direktori Saat Ini”

Pertanyaan yang mirip dengan “Dapatkan Batch Direktori Saat Ini”

Lebih banyak jawaban terkait untuk “Dapatkan Batch Direktori Saat Ini” di Shell/Bash

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya