I have nested archives that am trying to extract, it has following format so archive1.zip is main other archives are nested inside each other I need to get folder directory extracted.
- archive1.zip/
- archive2.tar/
- archive3.7z/
- folder/
- file.txt
- folder/
- archive3.7z/
- archive2.tar/
I tried the following :
Get-ChildItem -Path $path -Recurse | ForEach-Object { $_.FullName } | Split-Path | Get-Unique |
ForEach-Object { cd $_; 7z x * -r -aou -o"$path" }
But I can only get archive2.tar as output