Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
powershell:qnd:file_operations [2022/06/18 14:21] – mgupton | powershell:qnd:file_operations [2022/10/06 20:13] (current) – mgupton | ||
---|---|---|---|
Line 93: | Line 93: | ||
$archive.Entries | Select-Object -Property FullName | $archive.Entries | Select-Object -Property FullName | ||
+ | </ | ||
+ | |||
+ | Unzip zip archives contained in another zip archive. | ||
+ | <code powershell> | ||
+ | Expand-Archive -DestinationPath .\zips ' | ||
+ | ls .\zips\ | % {Expand-Archive -DestinationPath $env:temp $_.FullName} | ||
</ | </ | ||
Line 104: | Line 110: | ||
mkdir " | mkdir " | ||
+ | </ | ||
+ | |||
+ | <code powershell> | ||
+ | $names = @(" | ||
+ | |||
+ | $name = 0 | ||
+ | |||
+ | while ($name -lt $names.Count) { | ||
+ | if ((Test-Path " | ||
+ | break | ||
+ | } | ||
+ | |||
+ | $name += 1 | ||
+ | } | ||
+ | |||
+ | if ($name -eq $names.Count) { | ||
+ | $name = 0 | ||
+ | } | ||
+ | |||
+ | mkdir " | ||
</ | </ | ||