What is relative path and absolute path?

Absolute path : Exact path from root directory.Relative path : Relative to the current path.

Showing Answers 1 - 9 of 9 Answers


  • Sep 25th, 2005

absolute path is from home directory to user directory..


relative path is from present working directory to user directory..



  Was this answer useful?  Yes


  • Nov 4th, 2005


Say, your current working directory is /home/rama

If there is sub-dir called scripts here, then

the absolute path for the sub-dir is /home/rama/scripts


relative path is scripts or ./scripts (relative to /home/rama)


  • Feb 15th, 2006

Absolute path is a complete path, which starts from /.

relative path is the path relative to current working directory

  Was this answer useful?  Yes


  • Feb 6th, 2007

absolute path= main directory(say eg: YOU is a main directory )relative path=YOU / ME(here ME is sub-directory)

  Was this answer useful?  Yes


  • Dec 17th, 2007


I have a folder icon with the following code and path inside the desktop.ini inside the folder:

IconResource=D:MusicCarlos Santanasantana.ico,0

If I now change the path to
or even

like described here the folder icon won't show anymore.

What I want to do is if the folders gets moved to another PC and the drive letter is then F"  instead of D:  or whatever drive letter there is that the folder icons still show.

Please give me a hand here.

Thanks in advance,

  Was this answer useful?  Yes

A path is the general form or unique location of stored file and directories.

A path can be either relative or absolute (full path).


A full path or absolute path is a path that points to the same location on one file system regardless of working directory or combined path. It is usually written in reference to a root directory.


A relative path is the path related to the current working directory.


We will try to get an idea about absolute and relative path with the help of below example:


Suppose we have following directory:





Above both are examples of absolute path.

Lets assume our current working directory is below:



We want to change our current directory to ijk which is inside geh.

So follow the below commands


/abc/def/geh cd ijk



So for above example / bandana is a relative path directory.


/abc/def/geh/ijk cd /lmn/opq/rst/


Example of absolute path.


In short full path starting from root is called absolute path and subdirectory path is called relative path.

  Was this answer useful?  Yes


  • Apr 21st, 2009

Relative path name is relative to current directory. Following notations are very heplful.
1* denotes current directory
2** denotes parent directory
Absolute path name is full path name. Each directory along the path from the root directory to the desired file is specified. Must begin with / with derectories separated by/

  Was this answer useful?  Yes


  • Jul 25th, 2009

Absolute path: Exact path from root directory to the target directory.
Relative path: Path for current directory to target directory.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.


Related Answered Questions


Related Open Questions