Home > Mobile >  Alternative to Windows Alternate Data Streams
Alternative to Windows Alternate Data Streams

Time:01-15

I have the following need to implement on Windows: file with files. Originally I was thinking to use directory with extension. Something like "folderA.myappext", so when user clicks on it in Explorer, my app is launched instead of folder being opened. Unfortunately, I was unable to find a way to do that. Then I tried to use Alternate Data Streams. This works just fine, but several problems with it:

  1. It works only in NTFS, so no way to send it via email or FTP as is;
  2. Only WinRAR can properly archive it, and you still have to do extra clicks in the UI for that;
  3. The real file size (with all streams in it) is not shown in Explorer and does not participate in showing free/used space, which can very quickly lead to big problems for the user.

No, I can't use zip or any other way to combine files into one - this is high-performance app that also requires write streaming (i.e. it changes data all the time).

Any idea how else to achieve my need on Windows? I know on MacOS you can use 'package', but there is nothing like that on Windows. Any idea?

CodePudding user response:

Something like "folderA.myappext", so when user clicks on it in Explorer, my app is launched instead of folder being opened.

You can't do it based on the extension because folders don't have extensions but you can do it with desktop.ini. Windows 7 and later supports custom verbs on folders.

A working example can be found here.

  •  Tags:  
  • Related