[Tutor] absolute locations

Alan Gauld alan.gauld at blueyonder.co.uk
Fri Jan 9 16:23:51 EST 2004


Hi BLake,

> > If you want the path to be absolute you need to make it so.
> > Thats why a relative path can begin with the drive letter!
> 
> Ah, but that's not what your example showed.  D:\TEMP is an
> absolute path.  (It starts with a \ after the drive letter.)

Sure, But the significant part of that bit of the example 
was that I was setting the current location on the D drive 
while I was located on the C Drive - to show that DOS/Windows 
keeps track of current folder independently for each drive.

> I just tried "cd c:windows" followed by "cd c:system32", and
> it worked, so relative paths can begin with a drive letter,

Yes, because there is a separate current folder on each drive.
So if you are on the C: drive you can do

CD Windows
CD System32
DEL FOO.TXT

But to do the same if you were on the D drive you would need 
to do:

CD C:WIindows
CD C:System32
DEL C:foo.txt

But the important point here is that you did not need to change 
drive back to C: to change the realative path.

> back to my FreeBSD box, where there's only one filesystem,
> and everything makes sense.  ;)

The bit that doesn't make sense is having each drive be the 
root of its own filesystem, but once you've decided to do 
that the multiple path model is actually very good.

> Anyways, that was exactly the convincing explanation I needed.

Glad to help :-)

Alan g.



More information about the Tutor mailing list