Reply
 
Thread Tools Display Modes
  #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
  #2   Report Post  
Cindy M -WordMVP-
 
Posts: n/a
Default

Hi ?B?MmRvZ3M=?=,

These techniques must be documented somewhere.
My question is; Where?

I don't know of any documentation on this for Word. It's
more word-of-mouth and discovery/experience. Word is
complicated, in addition, because the "relative" paths are
actually relative to the CURRENT directory Word is
currently recognizing. So, if you would, for instance, open
another document from a different folder location, all of a
sudden the relative links in another document could stop
working.

Add to this that you can't use relative links in LINK
fields. (Word uses fields to maintain all types of links)

And, if you're not careful, recent versions of Word will
change the links if the option to update links is activated
in Tools/Options/General/Web options/Files.

To refer to a folder "below" the current folder, try:
".\\folder2\\abc.jpg"

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update
Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any
follow question or reply in the newsgroup and not by e-mail
:-)

Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:24 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"