A Windows XP help forum. PCbanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » PCbanter forum » Microsoft Windows XP » New Users to Windows XP
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

How to create relative file paths



 
 
Thread Tools Display Modes
  #1  
Old May 8th 05, 06:34 AM
2dogs
external usenet poster
 
Posts: n/a
Default How to create relative file paths

I know that XP accepts 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. Some of the formats I have seen are things like
"\\localhost\foldername", "...\filename", or "\\foldername\\filename" and
etc.

Where can I find detailed information such as formats, purpose, when to use
which one, foward slash or back slash, single slash or double slash, and the
like regarding path naming conventions?

--
2dogs in Oregon USA
Ads
  #2  
Old May 8th 05, 04:16 PM
glee
external usenet poster
 
Posts: n/a
Default

There are Universal Naming Conventions (UNC) such as in your example....see here --
Universal Naming Convention:
http://www.wown.com/j_helmig/guidunc.htm

and there is "abbreviated" syntax (environmental variables) that can be used in
certain commands, though this is different from what you refer to in your example --
Environment Variables:
http://home.earthlink.net/~rlively/M.../ENV/INDEX.HTM
--
Glen Ventura, MS MVP Shell/User, A+
http://dts-l.org/goodpost.htm
http://www.microsoft.com/communities...t/default.mspx


"2dogs" wrote in message
...
I know that XP accepts 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. Some of the formats I have seen are things like
"\\localhost\foldername", "...\filename", or "\\foldername\\filename" and
etc.

Where can I find detailed information such as formats, purpose, when to use
which one, foward slash or back slash, single slash or double slash, and the
like regarding path naming conventions?

--
2dogs in Oregon USA


  #3  
Old May 8th 05, 06:23 PM
Cymbal Man Freq.
external usenet poster
 
Posts: n/a
Default

Maybe when installing Windows, installing into a directory other than the
default Windows folder would be appropriate? Say, installing into the
"WindowsC" folder instead of the "Windows" folder, just slightly altering the
name of the folder so that the spyware junk out there won't find the "Windows"
folder flat-out; you could create a dummy folder called "Windows" for all the
spyware to find nothing in it.

We may need to encrypt the name of the Windows folder so the spyware junk won't
find it!


"glee" wrote in message

There are Universal Naming Conventions (UNC) such as in your
example....see here -- Universal Naming Convention:
http://www.wown.com/j_helmig/guidunc.htm

and there is "abbreviated" syntax (environmental variables) that can
be used in certain commands, though this is different from what you
refer to in your example -- Environment Variables:
http://home.earthlink.net/~rlively/M.../ENV/INDEX.HTM

"2dogs" wrote in message
...
I know that XP accepts 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.
Some of the formats I have seen are things like
"\\localhost\foldername", "...\filename", or
"\\foldername\\filename" and etc.

Where can I find detailed information such as formats, purpose, when
to use which one, foward slash or back slash, single slash or double
slash, and the like regarding path naming conventions?

--
2dogs in Oregon USA



  #4  
Old May 8th 05, 07:50 PM
glee
external usenet poster
 
Posts: n/a
Default

Alternate windir names was a popular and useful method that has been used for over a
decade, but these days I think it is a little less effective, as more sophisticated
malware can find the windows directory fairly quickly now, using variables. It may
protect somewhat from some of the less-smart malware.

Encrypting the name of the Windows directory may leave you with other problems, like
installers not being able to find it!
--
Glen Ventura, MS MVP Shell/User, A+
http://dts-l.org/goodpost.htm
http://www.microsoft.com/communities...t/default.mspx

"Cymbal Man Freq." Don't g wrote in message
news
Maybe when installing Windows, installing into a directory other than the
default Windows folder would be appropriate? Say, installing into the
"WindowsC" folder instead of the "Windows" folder, just slightly altering the
name of the folder so that the spyware junk out there won't find the "Windows"
folder flat-out; you could create a dummy folder called "Windows" for all the
spyware to find nothing in it.

We may need to encrypt the name of the Windows folder so the spyware junk won't
find it!


"glee" wrote in message

There are Universal Naming Conventions (UNC) such as in your
example....see here -- Universal Naming Convention:
http://www.wown.com/j_helmig/guidunc.htm

and there is "abbreviated" syntax (environmental variables) that can
be used in certain commands, though this is different from what you
refer to in your example -- Environment Variables:
http://home.earthlink.net/~rlively/M.../ENV/INDEX.HTM

"2dogs" wrote in message
...
I know that XP accepts 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.
Some of the formats I have seen are things like
"\\localhost\foldername", "...\filename", or
"\\foldername\\filename" and etc.

Where can I find detailed information such as formats, purpose, when
to use which one, foward slash or back slash, single slash or double
slash, and the like regarding path naming conventions?

--
2dogs in Oregon USA




  #5  
Old May 8th 05, 07:55 PM
Shenan Stanley
external usenet poster
 
Posts: n/a
Default

Cymbal Man Freq. wrote:
Maybe when installing Windows, installing into a directory other than
the default Windows folder would be appropriate? Say, installing into
the "WindowsC" folder instead of the "Windows" folder, just slightly
altering the name of the folder so that the spyware junk out there
won't find the "Windows" folder flat-out; you could create a dummy
folder called "Windows" for all the spyware to find nothing in it.

We may need to encrypt the name of the Windows folder so the spyware
junk won't find it!


Wouldn't help.. Environment variables contain your system directory and
much more..

Open a CMD prompt and type in:

SET

and press ENTER. See the environement variables that can be accessed by any
running application?

--
=- Shenan -=
=- MS MVP -=

--
The information above is intended to assist you; however, it is
suggested you research for yourself before you take any advice - you
are the one ultimately responsible for your actions/problems/solutions.
Whenever possible, the advice will include the method/places used in
compiling the answer. Also, questions may have been asked to clarify
your situation OR to give you an idea of where to look - do not dismiss
them lightly.


  #6  
Old May 8th 05, 09:57 PM
2dogs
external usenet poster
 
Posts: n/a
Default

Wow, you guys are somewhere else. My question is about how to create relative
file paths (for lack of better terminology) and shorthand methods for naming
paths between files and folders. I didn't think it had anything to do with
navigating a network, trying to outsmart spyware, what directory I should
install programs in, or encryption.

Let me try to give a simple example:

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\main file
File 2 is C:\2dogs\my documents\folder1\sub file
File 3 is C:\2dogs\my documents\folder1\folder2\image

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 point to a
location on 2dogs C: drive.

There are 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 Can't give better examples because I don't know
anymore about the subject. I have queried the Microsoft DB for hours and have
found nothing on this subject. These techniques must be documented somewhere.
My question is; Where?



--
2dogs in Oregon USA


  #7  
Old May 8th 05, 10:43 PM
glee
external usenet poster
 
Posts: n/a
Default

Replied inline.....
"2dogs" wrote in message
...
Wow, you guys are somewhere else. My question is about how to create relative
file paths (for lack of better terminology) and shorthand methods for naming
paths between files and folders. I didn't think it had anything to do with
navigating a network, trying to outsmart spyware, what directory I should
install programs in, or encryption.


Wow, why did you use an example of UNC ("\\localhost\foldername") when you aren't
referring to a network? You sort of got what you asked for. ;-)

Let me try to give a simple example:

I have 2 folders. (not really, but lets pretend OK)


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


SF,SG

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\main file
File 2 is C:\2dogs\my documents\folder1\sub file
File 3 is C:\2dogs\my documents\folder1\folder2\image


OK....

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.


It depends what kind of file File1 is, which contains the "references" to File2 and
File3. If it is an HTML file, you use HTML syntax to write the references, either
using absolute or relative paths. What filetype is File1?

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 point to a
location on 2dogs C: drive.


Again, if it is an HTML file, you use relative paths per the syntax used in HTML.
What is the filetype of File1?

There are 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 Can't give better examples because I don't know
anymore about the subject. I have queried the Microsoft DB for hours and have
found nothing on this subject. These techniques must be documented somewhere.
My question is; Where?


Depends on what filetype you are using, as I said redundantly above. :-) Depending
on the filetype, you probably need to ask in a group dedicated to programs that use
that filetype. (HTML? Word doc? RTF? Database file?)
--
Glen Ventura, MS MVP Shell/User, A+
http://dts-l.org/goodpost.htm
http://www.microsoft.com/communities...t/default.mspx


  #8  
Old May 9th 05, 08:35 AM
Cymbal Man Freq.
external usenet poster
 
Posts: n/a
Default

ERROR:
Cannot find the file "set" (or one of its components).
Make sure the path and filename are correct and that all required libraries are
available.

"Shenan Stanley" wrote in message

Cymbal Man Freq. wrote:
Maybe when installing Windows, installing into a directory other than
the default Windows folder would be appropriate? Say, installing into
the "WindowsC" folder instead of the "Windows" folder, just slightly
altering the name of the folder so that the spyware junk out there
won't find the "Windows" folder flat-out; you could create a dummy
folder called "Windows" for all the spyware to find nothing in it.

We may need to encrypt the name of the Windows folder so the spyware
junk won't find it!


Wouldn't help.. Environment variables contain your system directory
and much more..

Open a CMD prompt and type in:

SET

and press ENTER. See the environement variables that can be accessed
by any running application?

--
=- Shenan -=
=- MS MVP -=



  #10  
Old May 9th 05, 09:04 AM
Shenan Stanley
external usenet poster
 
Posts: n/a
Default

Cymbal Man Freq. wrote:
Maybe when installing Windows, installing into a directory other
than the default Windows folder would be appropriate? Say,
installing into the "WindowsC" folder instead of the "Windows"
folder, just slightly altering the name of the folder so that the
spyware junk out there won't find the "Windows" folder flat-out;
you could create a dummy folder called "Windows" for all the
spyware to find nothing in it.

We may need to encrypt the name of the Windows folder so the spyware
junk won't find it!


Shenan Stanley wrote:
Wouldn't help.. Environment variables contain your system directory
and much more..

Open a CMD prompt and type in:

SET

and press ENTER. See the environement variables that can be accessed
by any running application?


Cymbal Man Freq. wrote:
ERROR:
Cannot find the file "set" (or one of its components).
Make sure the path and filename are correct and that all required
libraries are available.


Please follow the directions given... The results you received are due to
you typing "SET" in the START -- RUN prompt, not the CMD prompt.

If you want to get the results straight from the START -- RUN prompt, you
can type this:

CMD /K SET

Click OK.

(If you type just "CMD", you receive a "Command Prompt"; if you typed just
"COMMAND", you receive a "Command Prompt". Both of these are DOS Emulators
really - as there is no DOS environment in Windows XP. the "CMD" version
gives you more options/tools/long filenames/etc.)

Read more about the Command Prompt:
http://www.microsoft.com/windowsxp/u...mmandline.mspx

Examples of Environment Variables:
http://kennethhunt.com/archives/000933.html
(Notice "SystemRoot"..)

--
=- Shenan -=
=- MS MVP -=

--
The information above is intended to assist you; however, it is
suggested you research for yourself before you take any advice - you
are the one ultimately responsible for your actions/problems/solutions.
Whenever possible, the advice will include the method/places used in
compiling the answer. Also, questions may have been asked to clarify
your situation OR to give you an idea of where to look - do not dismiss
them lightly.


  #11  
Old May 9th 05, 09:15 AM
David Candy
external usenet poster
 
Posts: n/a
Default

Cmd is not a Dos emulator. Command is also not a dos emulator but =
requires it to run. The black screen that both use is also not Dos but =
is a console window. Any console program can use it.

--=20
----------------------------------------------------------

"Shenan Stanley" wrote in message =
...
Cymbal Man Freq. wrote:
Maybe when installing Windows, installing into a directory other
than the default Windows folder would be appropriate? Say,
installing into the "WindowsC" folder instead of the "Windows"
folder, just slightly altering the name of the folder so that the
spyware junk out there won't find the "Windows" folder flat-out;
you could create a dummy folder called "Windows" for all the
spyware to find nothing in it.

We may need to encrypt the name of the Windows folder so the spyware
junk won't find it!

=20
Shenan Stanley wrote:
Wouldn't help.. Environment variables contain your system directory
and much more..

Open a CMD prompt and type in:

SET

and press ENTER. See the environement variables that can be accessed
by any running application?

=20
Cymbal Man Freq. wrote:
ERROR:
Cannot find the file "set" (or one of its components).
Make sure the path and filename are correct and that all required
libraries are available.

=20
Please follow the directions given... The results you received are =

due to=20
you typing "SET" in the START -- RUN prompt, not the CMD prompt.
=20
If you want to get the results straight from the START -- RUN prompt, =

you=20
can type this:
=20
CMD /K SET
=20
Click OK.
=20
(If you type just "CMD", you receive a "Command Prompt"; if you typed =

just=20
"COMMAND", you receive a "Command Prompt". Both of these are DOS =

Emulators=20
really - as there is no DOS environment in Windows XP. the "CMD" =

version=20
gives you more options/tools/long filenames/etc.)
=20
Read more about the Command Prompt:
=

http://www.microsoft.com/windowsxp/u...nmore/ballew_=
commandline.mspx
=20
Examples of Environment Variables:
http://kennethhunt.com/archives/000933.html
(Notice "SystemRoot"..)
=20
--=20
=3D- Shenan -=3D
=3D- MS MVP -=3D

--=20
The information above is intended to assist you; however, it is
suggested you research for yourself before you take any advice - you
are the one ultimately responsible for your =

actions/problems/solutions.
Whenever possible, the advice will include the method/places used in
compiling the answer. Also, questions may have been asked to clarify
your situation OR to give you an idea of where to look - do not =

dismiss
them lightly.=20
=20

  #12  
Old May 9th 05, 09:25 AM
Shenan Stanley
external usenet poster
 
Posts: n/a
Default

David Candy wrote:
Cmd is not a Dos emulator. Command is also not a dos emulator but
requires it to run. The black screen that both use is also not Dos
but is a console window. Any console program can use it.


My bad on the wording.. "command interpreter" would have been the proper
terminolgy.
*smile*
Thanks!

--
=- Shenan -=
=- MS MVP -=

--
The information above is intended to assist you; however, it is
suggested you research for yourself before you take any advice - you
are the one ultimately responsible for your actions/problems/solutions.
Whenever possible, the advice will include the method/places used in
compiling the answer. Also, questions may have been asked to clarify
your situation OR to give you an idea of where to look - do not dismiss
them lightly.


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
page file LeeRay General XP issues or comments 10 April 6th 05 09:06 AM
cannot delete file: cannot read from the source file or disk Yakimo General XP issues or comments 10 October 18th 04 06:48 PM
xp blows... this makes no sense Jerry Windows XP and video cards, drivers and similar 1 July 31st 04 09:00 PM
xp blows... this makes no sense Jerry Windows XP and video cards, drivers and similar 0 July 30th 04 04:42 AM
xp blows... this makes no sense Jerry Windows XP and video cards, drivers and similar 0 July 30th 04 01:21 AM






All times are GMT +1. The time now is 09:38 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 PCbanter.
The comments are property of their posters.