Right now it seems that 7zfm.exe (7-zip file manager) is the best GUI option for adding and viewing Alternate Data Streams.
Highlight a file in 7zfm, then select File > Alternate Data Streams. Alt+F, A will do the trick. It can also be done from the right-click menu.
The pane will then display the streams in the file, or an empty pane if it doesn't have any streams yet. The file's streams are displayed just like files in a folder, except the columns aren't exactly the same.
To create a stream, click File > Create File, or just press Ctrl+N. In this streams pane, a stream is created, not a file.
To add text to the stream, click File > Edit, or just press F4. The stream opens in Notepad. Enter your text and then press Ctrl+S to save. The changed stream length is immediately reflected in the 7zfm pane.
Repeat to add or edit as many streams to the containing file as you like.
To navigate out of the streams back to the containing file, just press Backspace.
Now, what's the easiest way to go from a file in Everything and show it in the 7zfm pane? You can just right-click on the file in Everything, then select Copy Path to Clipboard from the Everything context menu. Then switch to 7zfm and paste it in the address bar.
It would be good if we could right-click in Everything and then use the 7-zip context menu option, but this does not provide a way to open a non-archive file in 7zfm. You can open a folder in 7zfm this way, but not a non-archive file. But I have set up OpenWithPlusPlus (https://github.com/stax76/OpenWithPlusPlus) to open up any file's parent folder in 7zfm, and once you do that, you can highlight the file in 7zfm and click File > ADS.
There is the annoyance that once you have the containing folder open in 7zfm, you have to find again the file you wanted to add streams to. I haven't found a way to do this automatically.
More ideas appreciated!
7zfm for adding / viewing alternate data streams
7zfm for adding / viewing alternate data streams
Last edited by jimspoon on Mon Aug 15, 2022 6:04 pm, edited 1 time in total.
Re: 7zfm for adding / viewing alternate data streams
p.s. I used Ctrl+Shift+C in Everything to copy a file's complete path, and then tried pasting it into the 7zfm address bar. Oddly enough 7zfm won't let you do that. You can only paste a path to a folder, not the complete path to a file including the filename.
Re: 7zfm for adding / viewing alternate data streams
You can use the following to open the list of ADS's straight away:
Note the : at the end of the filename.
If you happen to know a way to re-use an already open z7fm window, please share.
Code: Select all
"c:\path to\7zfm.exe" "c:\some folder\this file.txt:"
If you happen to know a way to re-use an already open z7fm window, please share.
Re: 7zfm for adding / viewing alternate data streams
It works perfectly! And I was able to configure OpenWithPlusPlus to do it immediately from the file's context menu:
Re: 7zfm for adding / viewing alternate data streams
Using the 7-zip command line program, 7z.exe, you can include ADS in archives that you create, but are you able to list (display) said ADS that way (as you say the GUI is able to do)?
Re: 7zfm for adding / viewing alternate data streams
According to the 7zip help file, "Current version of 7-Zip can store NTFS alternate streams only to WIM archives."
So I tried a command to add a file with its ADS to a WIM file. Then I was able to list the file and the ADS inside the WIM file - see below.
So I tried a command to add a file with its ADS to a WIM file. Then I was able to list the file and the ADS inside the WIM file - see below.
Code: Select all
C:\Users\jimsp\Documents\adstest>7z a -sns archive3.wim adstest1.txt
7-Zip 22.00 (x64) : Copyright (c) 1999-2022 Igor Pavlov : 2022-06-15
Scanning the drive:
1 file, 59 bytes (1 KiB)
3 alternate streams, 839 bytes (1 KiB)
Creating archive: archive3.wim
Add new data to archive: 1 file, 59 bytes (1 KiB)
3 alternate streams, 839 bytes (1 KiB)
Files read from disk: 4
Archive size: 2546 bytes (3 KiB)
Everything is Ok
C:\Users\jimsp\Documents\adstest>7z l -sns archive3.wim
7-Zip 22.00 (x64) : Copyright (c) 1999-2022 Igor Pavlov : 2022-06-15
Scanning the drive for archives:
1 file, 2546 bytes (3 KiB)
Listing archive: archive3.wim
--
Path = archive3.wim
Type = wim
Physical Size = 2546
Size = 898
Packed Size = 898
Method = Copy:15
Cluster Size = 32768
Created = 2022-08-19 15:24:52.5477420
Modified = 2022-08-19 15:24:52.5477420
Comment = <WIM><TOTALBYTES>1852</TOTALBYTES><IMAGE INDEX="1"><NAME>1</NAME><DIRCOUNT>0</DIRCOUNT><FILECOUNT>1</FILECOUNT><TOTALBYTES>59</TOTALBYTES><CREATIONTIME><HIGHPART>0x01D8B409</HIGHPART><LOWPART>0xBCF7962C</LOWPART></CREATIONTIME><LASTMODIFICATIONTIME><HIGHPART>0x01D8B409</HIGHPART><LOWPART>0xBCF7962C</LOWPART></LASTMODIFICATIONTIME></IMAGE></WIM>
Version = 1.13
Multivolume = -
Volume = 1
Volumes = 1
Images = 1
Date Time Attr Size Compressed Name
------------------- ----- ------------ ------------ ------------------------
2022-08-12 07:01:03 ....A 59 59 adstest1.txt
2022-08-12 07:01:03 ..... 263 263 adstest1.txt:stream1.txt
2022-08-12 07:01:03 ..... 62 62 adstest1.txt:stream2.txt
2022-08-12 07:01:03 ..... 514 514 adstest1.txt:stream3.txt
------------------- ----- ------------ ------------ ------------------------
2022-08-12 07:01:03 59 59 1 files
2022-08-12 07:01:03 839 839 3 alternate streams
2022-08-12 07:01:03 898 898 4 streams
Re: 7zfm for adding / viewing alternate data streams
Ah, I didn't realized that.According to the 7zip help file, "Current version of 7-Zip can store NTFS alternate streams only to WIM archives."
When I tested, I just went with .7z.
(That's a limitation .)
(I'll note, that on the listing end 'l', you don't need to specify the -sns switch.
7z l archive3.wim
Re: 7zfm for adding / viewing alternate data streams
good to know, thanks!