Ejercicio anterior: https://www.jesusninoc.com/11/28/ejercicios-de-powershell-crear-una-estructura-de-directorios/
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
## 2 -> ISO -> 1EVA ## 2 -> ISO -> 2EVA foreach($alumnos in 1..5) { New-Item -Name ($alumnos*2) -ItemType Directory -Force foreach($materias in "iso","redes","fol") { New-Item -Name $materias -ItemType Directory -Path ($alumnos*2) -Force foreach($evaluacion in "1eva","2eva","3eva") { $ruta = [String]($alumnos*2) + "\" + $materias $ruta New-Item -Name $evaluacion -ItemType Directory -Path $ruta -Force Write-Host ($alumnos*2) $materias $evaluacion } } } |