View Single Post
  #1   Report Post  
2dogs
 
Posts: n/a
Default How to creat relative and shorthand file path names?

I know that Office and Windows XP accept many file path naming conventions
other than a full absolute file path such as "C:\program files\microsoft
office\documents\file.doc", and etc. I have seen a variety of shorthand
methods for naming file paths and some that appear to be relative file paths
that reference a child folder, or parent folder, or perhaps no folder at all
if the file being referenced is in the same folder as the application that
uses it. This would seem to be an absolute necessity, for the sake of
portability from one machine to another, where a file that references or is
referenced by another file may be located somewhere other than in its
original location.

Here is an example of what I mean:

I have 2 folders. (not really, but lets pretend OK)
Here are their absolute locations:

Folder 1 is at location C:\2dogs\my documents\folder1
Folder 2 is at location C:\2dogs\my documents\folder1\folder2

I also have 3 files. (not really, but lets pretend again OK)
Here are their absolute path names:

File 1 is C:\2dogs\my documents\folder1\document1.doc
File 2 is C:\2dogs\my documents\folder1\document2.doc
File 3 is C:\2dogs\my documents\folder1\folder2\image.jpg

In File 1 there is a reference to File 2 that is in the same folder. File 1
refers to File 2 by using the absolute path name to File 2. In File 1 there
is also a reference to File 3 that is in a folder that is 1 level farther
down in the directory tree. File 1 refers to File 3 by using the absolute
path name to File 3.

I send the 2 folders (folder1 with folder2 inside it) to Bill (don't worry
about who Bill is because we are still pretending OK). Bill puts the folders
in his personal folder on his D: drive. So now the paths to the folders a

D:\Bill\Personal Folder\folder1
D:\Bill\Personal Folder\folder1\folder2

When Bill opens the files and tries to use them they will not work because
all the references in those files point to locations that no longer exist.
That is because the references were absolute file paths that pointed to
locations on 2dogs C: drive. Ther must be path naming conventions that
prevent this kind of problem.

Some of the many formats I have seen are things like "document.doc",
"...\filename", ".../../../My%20Documents/My%20Pictures/document.doc",
C:\\document folder\\document.doc. I have no idea what these formats are and
I can't give better examples because I don't know anymore about the subject.
All I know is that they are obviously not classic long form direct path
references.

There are, obviously, many methods for giving references using relative path
names instead of absolute path names and also methods for abbreviating path
names both relative and absolute. I have queried the Microsoft DB for hours
and have found nothing on this subject. When I posed this same question in
the XP forum it was stated that all these shorthand methods are program
dependent and are different in every program; however I suspect they are also
very Operating System dependent as well. If I am writing HTML code it has its
own format for relative adressing but I suspect that if I open any Microsoft
program the techniques are the same and are dependent on how the OS handles
file path names. These techniques must be documented somewhere.
My question is; Where?

--
2dogs in Oregon USA