I have a file lets say "c:\file1.txt" that has an ADS file lets say stm so "c:\file1.txt:stm" now I want to delete the stm without modifying file1
I read somewhere that I need to have an old copy of file1.txt without ADS in order to remove the ADS by replacing file1 with stream with the one that doesnt have one ... is there a better and clean way of doing so ?
All you need to do is delete the stream by name. Using the Windows API that would be:
DeleteFile("c:\\file1.txt:stm");
You could use plenty of other APIs to do the same thing though, or the command line.
Helpful reference: http://www.flexhex.com/docs/articles/alternate-streams.phtml