Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

windows equivalent of ./ (current directory) [closed]

On Linux when I want to execute some file and use relative path.

For example I want to do something like this:

cd c:\windows
c:\windows>./System32/ipconfig.exe

However what I get is an error message telling me that "." has not been found.

like image 925
Natan Rubinstein Avatar asked Aug 17 '15 22:08

Natan Rubinstein


2 Answers

A period denotes the current directory in Windows.

For your example you would use the following:

c:\> cd c:\windows
c:\Windows> .\System32\ipconfig.exe

Alternately, you could forego the .\ and do it like this:

c:\Windows> System32\ipconfig.exe
like image 190
user5071535 Avatar answered Oct 14 '22 08:10

user5071535


Use the correct slash marks and you should be good. Windows uses backslashes as the directory symbol instead of the forward slash. The only caveat to this is if you have to change drive letters. The cd command will change the working directory, but not the drive. To change drives use [drive letter][colon]:

C:\Windows>cd P:\XenApp\Utils    
C:\Windows>P:    
P:\XenApp\Utils>
like image 35
Tommy Howell Avatar answered Oct 14 '22 07:10

Tommy Howell