Search the Community
Showing results for tags 'alternate data stream'.
-
For my next project I would like to send files with "alternate data streams" by email in ZIP format. I can not use any external program like 7-Zip or WinRAR. (They would fit😥) Who knows how to create a ZIP file with "alternate data streams" included with the Powershell command "Compress-Archive"? Here a test script: (save as "ADSTester.cmd") @rem Try to create a zip file with alternate data streams (ADS) included @rem Housekeeping @cls @del ADSTester.zip >nul: @RD /S /Q Extracted >nul: @del ADSTester.txt >nul: @rem End of Housekeeping echo This is the ADSTester.txt file >ADSTester.txt echo This is the ADSTester.txt:Part1 file >ADSTester.txt:Part1 echo This is the ADSTester.txt:Part2 file >ADSTester.txt:Part2 dir /r ADSTester.txt @rem See the 3 files @rem **************************************************************** @rem **************************************************************** @rem Please alter the next lines to include the alternate data streams. powershell Compress-Archive -Path .\ADSTester.txt -Update -DestinationPath ADSTester.zip powershell Expand-Archive -Path ADSTester.zip -DestinationPath .\Extracted\ dir /r Extracted\ADSTester.txt @rem Only one file left :-( pause
- 2 replies
-
- powershell
- zip
-
(and 2 more)
Tagged with: