How to create relative file paths

G

Guest

Guest
Archived from groups: microsoft.public.windowsxp.newusers (More info?)

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
 
G

Guest

Guest
Archived from groups: microsoft.public.windowsxp.newusers (More info?)

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/MANUALS/ENV/INDEX.HTM
--
Glen Ventura, MS MVP Shell/User, A+
http://dts-l.org/goodpost.htm
http://www.microsoft.com/communities/conduct/default.mspx


"2dogs" <2dogs@discussions.microsoft.com> wrote in message
news:E0F9056B-1E71-491C-A490-66A68977AB7B@microsoft.com...
> 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
 
G

Guest

Guest
Archived from groups: microsoft.public.windowsxp.newusers (More info?)

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" <glee29@spamindspring.com> wrote in message
news:Ob8RgD%23UFHA.3432@TK2MSFTNGP10.phx.gbl
> 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/MANUALS/ENV/INDEX.HTM
>
> "2dogs" <2dogs@discussions.microsoft.com> wrote in message
> news:E0F9056B-1E71-491C-A490-66A68977AB7B@microsoft.com...
>> 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
 
G

Guest

Guest
Archived from groups: microsoft.public.windowsxp.newusers (More info?)

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/conduct/default.mspx

"Cymbal Man Freq." <Don't Bother@ForgedPostsAnonymous.unorg> wrote in message
news:DWrfe.17210$ia6.2724@twister.nyroc.rr.com...
> 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" <glee29@spamindspring.com> wrote in message
> news:Ob8RgD%23UFHA.3432@TK2MSFTNGP10.phx.gbl
> > 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/MANUALS/ENV/INDEX.HTM
> >
> > "2dogs" <2dogs@discussions.microsoft.com> wrote in message
> > news:E0F9056B-1E71-491C-A490-66A68977AB7B@microsoft.com...
> >> 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
>
>
 
G

Guest

Guest
Archived from groups: microsoft.public.windowsxp.newusers (More info?)

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.
 
G

Guest

Guest
Archived from groups: microsoft.public.windowsxp.newusers (More info?)

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 are:

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
 
G

Guest

Guest
Archived from groups: microsoft.public.windowsxp.newusers (More info?)

Replied inline.....
"2dogs" <2dogs@discussions.microsoft.com> wrote in message
news:1FEE92DB-0F6D-4505-A5B0-AAE378B84CDF@microsoft.com...
> 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 are:
>
> 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/conduct/default.mspx
 
G

Guest

Guest
Archived from groups: microsoft.public.windowsxp.newusers (More info?)

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" <newshelper@gmail.com> wrote in message
news:eQqnN%23$UFHA.3716@TK2MSFTNGP12.phx.gbl
> 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 -=<
 
G

Guest

Guest
Archived from groups: microsoft.public.windowsxp.newusers (More info?)

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/using/helpandsupport/learnmore/ballew_commandline.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.
 
G

Guest

Guest
Archived from groups: microsoft.public.windowsxp.newusers (More info?)

Sure you typed it in a command prompt?

--
----------------------------------------------------------

"Cymbal Man Freq." <Don't Bother@ForgedPostsAnonymous.unorg> wrote in message news:FoEfe.17328$ia6.14896@twister.nyroc.rr.com...
> 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" <newshelper@gmail.com> wrote in message
> news:eQqnN%23$UFHA.3716@TK2MSFTNGP12.phx.gbl
>> 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 -=<
>
>
 
G

Guest

Guest
Archived from groups: microsoft.public.windowsxp.newusers (More info?)

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.

--
----------------------------------------------------------

"Shenan Stanley" <newshelper@gmail.com> wrote in message news:eEXQv2GVFHA.2540@tk2msftngp13.phx.gbl...
> 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/using/helpandsupport/learnmore/ballew_commandline.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.
>
>
 
G

Guest

Guest
Archived from groups: microsoft.public.windowsxp.newusers (More info?)

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.