5

I have been reading about alternate data streams and I am kind of curious if any big applications for Windows actually uses this feature of NTFS.

I am also really curious as to whether or not traditional backup and archiving utilities back up this data and is able to be restored.

4
  • As long as it is backed up to a NTFS partition, if you back up to a fat partition data streams are lost.
    – Moab
    Sep 9, 2010 at 16:22
  • Most archiving utilities will not capture alternate streams. In fact, RAR/WinRAR is the only one I can think of off the top of my head (with the -os switch).
    – afrazier
    Sep 9, 2010 at 17:08
  • Any backup application worth salt understands alternate data streams. You used to have to use an undocumented API to list them, but now with the FindFirstStreamW API there's no excuse. And they have all kinds of cool uses (e.g. thumbnail views and zone identifiers).
    – snoone
    Sep 14, 2010 at 17:48
  • Later versions of 7zip also support streams, but only to .Win files. You can also easily look at the contents from the commandline with later versions of 4NT (jpsoft.com). It can give you directories that include stream info, and then you can query the stream like a part of the file. For example, I'm using Echo > to store some text data in a stream, and Type or Copy to get it back out. Not completely convinced it's a good idea, but I'm trying it. I mostly want some data to survive moves and renames. In my case, I'm just storing a ticket number for a bug. Jan 30, 2016 at 18:51

3 Answers 3

3

Alternate Data Streams in NTFS Applies to

* Microsoft Win32 Application Programming Interface, when used with:
      o Microsoft Windows NT Advanced Server 3.1
      o Microsoft Windows NT 4.0
      o Microsoft Windows NT 3.51 Service Pack 5
      o Microsoft Windows NT 4.0
      o Microsoft Windows 2000 Standard Edition
      o the operating system: Microsoft Windows XP

Very small ADS (Alternate Data Streams) are also added within Internet Explorer (and now also other browsers) to mark files that have been downloaded from external sites: *they may be unsafe to run locally and the local shell will require confirmation from the user before opening them. When the user indicates that he no longer wants this confirmation dialog, this ADS is simply dropped from the MFT entry for downloaded files.

Resource from Wikipedia

2
  • How exactly does this answer the question? Jan 21, 2020 at 2:52
  • 1
    Answers the "...if any big applications for Windows actually uses this feature of NTFS" part. Jan 21, 2020 at 3:43
1

I use ADS to annotate files that are otherwise difficult to document. For example, adding an "Annotations" ADS to MyBigExcelWorkbook.xlsm allows me to keep notes of changes and enhancements that I make. They are easy enough to edit:

C:>:: First create the ADS
C:>echo 2020-02-21 13:00 Creating Annotations MyBigExcelWorkbool.xlsm:Annotations
C:>:: Now edit the annotations
C:>notepad MyBigExcelWorkbool.xlsm:Annotations

will do it for you, so will Wordpad. The ADS stream survives Excel saving changes in the workbook.

Caveat: some backup utilities will lose the ADS so make sure that you check that your backup and restore routine will preserve them ([https://www.2brightsparks.com/resources/articles/ntfs-alternate-data-stream-ads.html]).

1

SQL Server 2012 and earlier users alternate data stream as part of the CHECKDB process:

SQL Server uses named streams as well as sparse files when running any of the DBCC CHECK statements such as everyone's favorite DBCC CHECKDB when these commands are run online.

E.g.

This meant that you couldn't put an SQL Server database on a ReFS volume, as ReFS didn't support Alternate Data Streams. Microsoft changed that SQL Server 2014. 🕗

Other examples

Some other instances of people using alternate data streams.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.