and Windows 11
Windows 8.1
For now I don’t have a one line solution. If it needs to be used for processing a many files in different folders, with (possibly) different types of archives (I’m trying to think “globally”)… it won’t be exactly a “human readable” line. You can think in some directions: 1. A “pure” script (cmd, PowerShell, VBS, PERL, etc.) solution – these are instruments mainly for automating work; 2. A script solution with an external tool(s). There are Cygwin, Yori and many other tools which could be useful....
I have a following suggestion then: @ECHO OFF SETLOCAL EnableDelayedExpansion FOR /F %%A IN ('DIR *.7z /A:-D /B') DO 7za.exe t %%A |find "Path =" >> paths.txt FOR /F %%B IN ('DIR *.7z /A:-D /B') DO 7za.exe t %%B |find "Size:" >> sizes.txt < sizes.txt ( FOR /F "delims=" %%C IN (paths.txt) DO ( SET /P SIZES= ECHO %%C;!SIZES! ) ) > combined.txt ENDLOCAL
I'm glad to help. You can try this command: for /f "tokens=2" %I in ('call "C:\programs portable folder\7za.exe" t -p"My Strong Password" "C:\some archive folder\some test archive.7z"^|find "Size:"') do @echo %I
Maybe this will be useful: for /f "tokens=2" %I in ('7za.exe t -pMyPassword archive.7z^|find "Size:"') do @echo %I
Maybe this will be useful: for /f "tokens=2" %I in ('7za.exe t -pMyPassword archive.7z^|find "Size:"') do echo %I
In this case I should remove the -r switch. I'll think about that. Thank you!