powershell:extraer_zip_en_batch
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| powershell:extraer_zip_en_batch [2026/08/20 13:29] – adm.wiki | powershell:extraer_zip_en_batch [2026/08/26 14:57] (current) – adm.wiki | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Extraer .zip en Batch ====== | + | ====== Extraer .zip en Batch/ |
| + | **partiendo desde aqui:** | ||
| + | {{.: | ||
| **Codigo:** | **Codigo:** | ||
| - | <code powershell> | + | <code powershell |
| $files = Get-ChildItem " | $files = Get-ChildItem " | ||
| Line 21: | Line 23: | ||
| } | } | ||
| </ | </ | ||
| + | **Output** | ||
| + | {{.: | ||
| + | |||
| + | **Explicacion: | ||
| + | $files = Get-ChildItem " | ||
| + | crea la variable $files de tipo array con los nombres de archivo que terminan en .zip | ||
| + | foreach ($file in $files) | ||
| + | foreach (bucle), trabaja con $file | ||
| + | $destination = Join-Path " | ||
| + | variable, $file.Basename, | ||
| + | New-Item -ItemType Directory -Path $destination -Force | Out-Null | ||
| + | crea el directory " | ||
| + | Write-Host " | ||
| + | Escribe/ | ||
| + | & " | ||
| + | $file.FullName ` | ||
| + | " | ||
| + | Descomprime en su carpeta destino, sin confirmacion, | ||
| + | Write-Host " | ||
| + | ultimo mensaje en la terminal, y luego viene el siguiente string del array. | ||
| + | |||
powershell/extraer_zip_en_batch.1787225354.txt.gz · Last modified: by adm.wiki
