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).
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".
Dir /r foldername
You should see test.txt associated with foldername (that stream will contain "my string").
Double check... type:
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.
I noticed the attributes of the folder changed:
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.