Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Locating a file on the path

Tags:

windows

Does anybody know how to determine the location of a file that's in one of the folders specified by the PATH environmental variable other than doing a dir filename.exe /s from the root folder?

I know this is stretching the bounds of a programming question but this is useful for deployment-related issues, also I need to examine the dependencies of an executable. :-)

like image 795
ljs Avatar asked Oct 12 '08 15:10

ljs


People also ask

What is the path of a file?

A path is either relative or absolute. An absolute path always contains the root element and the complete directory list required to locate the file. For example, /home/sally/statusReport is an absolute path. All of the information needed to locate the file is contained in the path string.

What is a folder path?

A path is a slash-separated list of directory names followed by either a directory name or a file name. A directory is the same as a folder.

How do I get the path of a file in Linux?

The best Linux command to get file path is using pwd command. To use this command, type “pwd” into your terminal and press enter. This command will print the current working directory. The output will be the file path.

How do I find a file path in command prompt?

Go to the destination folder and click on the path (highlights in blue). type cmd. Command prompt opens with the path set to your current folder.


1 Answers

You can use the where.exe utility in the C:\Windows\System32 directory.

like image 77
MvdD Avatar answered Nov 15 '22 20:11

MvdD