Absolute Path is the hierarchical path that locates a file or folder in a file system starting from the root. The absolute path of a file enables the location of the file to be precisely specified, independent of where the user’s current directory is located.
In MS-DOS and Microsoft Windows platforms, the absolute path of a file is specified starting with a drive letter, followed by the hierarchy of directories in which the file is contained (with each directory separated by a backslash), and concluding with the exact filename.
For example, on a computer running Windows XP, the absolute path to the executable for the game of Minesweeper, which is typically located in the Windows directory on the C drive, would be the following:
If the user opens a command prompt and the current directory is C:\Windows, the user can simply type sol.exe to run the Solitaire program. From any other current directory though, the user must either type the absolute path to execute the program or specify the relative path from the current directory to the executable file.
What is the difference between a relative and absolute path
When you are trying to link to a page or file on your site or the location of a file, knowing the difference between a relative path and absolute path can be quite helpful. The following sections contain information on these differences for each of the major operating systems as well as how to link files appropriately on a web page. To proceed, choose your topic of interest from the following list.
On UNIX platforms, path names are specified using forward rather than backward slashes, and absolute paths don’t start with a drive letter. For example, the absolute path to the file script12, located in the bin subdirectory of the usr directory, would be /usr/bin/script12