Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Create a folder, call it foldername. At the command prompt navigate to the parent folder where you created this folder and type:

dir /r foldername

(this will list the foldername and any data streams associated with it--there will be none).

Then type:

echo my string >foldername:test.txt

This will create an Alternate Data Stream named test.txt for the folder named foldername, populating it with the "my string".

Type:

Dir /r foldername

You should see test.txt associated with foldername (that stream will contain "my string").

Double check... type:

notepad foldername:test.txt

Notepad will open and allow you to edit it. Close it.

Now go to the Customize tab of the property sheet (in Explorer, right-click on the folder and select properties, click on the Customize tab) and change the icon. Save it.

Go back to the command prompt and type:

echo my string2 >foldername:test2.txt

This should create a 2nd stream named test2.txt. It fails with "access denied". I have found no way to get around it without recreating the folder.

Bottom line: You cannot create (or edit) an alternate data stream for a folder after you change it's icon.

Why?

UPDATE:

I noticed the attributes of the folder changed:

attrib foldername

returned R (readonly). Attempting to change this from Explorer did not seem to work. However, this works...

attrib -R foldername

Then I can create and edit named data streams. Bad news here... it resets the icon of folder. So, it appears that when you change the folder icon it marks the folder (not its contents) as readonly. It appears folder readonly attributes are not changeable from Explorer.

http://support.microsoft.com/default.aspx?scid=kb;en-us;326549

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.