What is relative path and absolute path?

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

  
Showing Answers 1 - 19 of 19 Answers

siva

  • Sep 25th, 2005
 

absolute path is from home directory to user directory..

but

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

bye

-Siva

  Was this answer useful?  Yes

raki_ch

  • Nov 4th, 2005
 

Ex:

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

and

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

umesh

  • 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

vel

  • 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

jubcheng

  • Dec 17th, 2007
 

Hi.

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

[ViewState]
Mode=
Vid=
FolderType=Music
Logo=
[.ShellClassInfo]
IconResource=D:MusicCarlos Santanasantana.ico,0

If I now change the path to
.santana.ico,0
or
.santana.ico
or even
.santana.ico

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,
Cheng

  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:

 

/abc/def/geh/ijk

/lmn/opq/rst/

 

Above both are examples of absolute path.

Lets assume our current working directory is below:

/abc/def/geh

 

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

So follow the below commands

 

/abc/def/geh cd ijk

/abc/def/geh/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

shyam82

  • 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

mmakoko

  • 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