Everyone can set attributes to folder. But I have found that synonym like . or .. do not represent attributes of origin folder.
How else can use them except as a reference?
Quote from: Rockphorr on December 09, 2010, 07:21:51 PM
Everyone can set attributes to folder. But I have found that synonym like . or .. do not represent attributes of origin folder.
How else can use them except as a reference?
These are typical file folder identifiers in the OS. They are there as bread crumbs (more or less). "." represents the current folder you are in, and ".." represents the folder that is above the one you are in chain-wise.
So if I'm in C:\Windows\System32, then "." represents C:\Windows\System32 and ".." represents C:\Windows
They're just relics from Unix, that's where DOS 2.0 got its hierarchical file system from and for that reason they are forever part of it, however they are useful when building relative paths. But just to confirm what Glenn9999 said, they are not synonyms for any path, more like a directive to the Shell.
Edgar
Quote from: donkey on December 09, 2010, 09:37:24 PM
They're just relics from Unix, that's where DOS 2.0 got its hierarchical file system from and for that reason they are forever part of it, however they are useful when building relative paths. But just to confirm what Glenn9999 said, they are not synonyms for any path, more like a directive to the Shell.
Edgar
I think that if i enter to hidden or system folder like recucler i see hidden attributes at ".", but it is always normal.
Now i see that win xp ".." represents atributes of folder where we are. Мy win 95osr2 does not do it.
dir /ad /s should show the attributes of all sub directories, but I found that it doesn't.
It just shows the directory. (It was a read only dir)
attrib /d /s will show attributes of all directories
Quote from: Rockphorr on December 10, 2010, 05:39:03 AM
I think that if i enter to hidden or system folder like recucler i see hidden attributes at ".", but it is always normal.
Like was said, it wasn't really meant to represent anything specific, just a bread crumb function to point to something. Most of my code that processes directories tends to ignore "." and "..", and I would think most code would follow the same pattern. As was said, ".." tends to be useful for relative paths. But I'm sure they are used for something. But they are generally not intended to relay the attributes of the folder that they are intended to represent.