Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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


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.



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.;en-us;326549

share|improve this question

You must log in to answer this question.

Browse other questions tagged .