Exit Posted January 21, 2020 Posted January 21, 2020 (edited) 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  Edited January 21, 2020 by Exit App: Au3toCmd       UDF: _SingleScript()                Â
spudw2k Posted January 22, 2020 Posted January 22, 2020 Not sure if the Compress-Archive method will collect the stream data and embed it in an archive, then put it back in place when the file is extracted. You might have to do a custom script to extract the stream data and add it to the archive, then a archive extraction process to "rebuild" the streams.  I saw an article that says the RAR file format supports NTFS ADS, but haven't looked into it. Exit 1 Spoiler Things I've Made: Always On Top Tool ◊ AU History â—ŠÂ Deck of Cards â—Š HideIt â—Š ICU â—Š Icon Freezer â—Š Ipod Ejector â—Š Junos Configuration Explorer â—Š Link Downloader â—Š MD5 Folder Enumerator â—Š PassGen â—ŠÂ Ping Tool â—Š Quick NIC â—Š Read OCR â—Š RemoteIT â—Š SchTasksGui â—Š SpyCam â—Š System Scan Report Tool â—Š System UpTime â—Š Transparency Machine ◊ VMWare ESX Builder Misc Code Snippets: ADODB Example â—Š CheckHover ◊ Detect SafeMode â—Š DynEnumArray â—Š GetNetStatData ◊ HashArray â—Š IsBetweenDates â—Š Local Admins â—Š Make Choice â—Š Recursive File List â—Š Remove Sizebox Style â—Š Retrieve PNPDeviceID â—Š Retrieve SysListView32 Contents â—Š Set IE Homepage â—Š Tickle Expired Password â—Š Transpose Array Projects: Drive Space Usage GUI â—ŠÂ LEDkIT â—Š Plasma_kIt â—ŠÂ Scan Engine Builder â—Š SpeeDBurner â—Š SubnetCalc Cool Stuff: AutoItObject UDF â—Š Extract Icon From Proc â—Š GuiCtrlFontRotate â—Š Hex Edit Funcs â—Š Run binary â—Š Service_UDF Â
Exit Posted February 1, 2020 Author Posted February 1, 2020 @spudw2k. Thanks for the contribution. I took up the suggestion and implemented it in my project Au3toCmd. See my signature. App: Au3toCmd       UDF: _SingleScript()                Â
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now