$base = "https://dev.frankenserver.net/scripts" $path = "" while ($true) { $url = "$base/$path" $resp = Invoke-WebRequest -Uri $url -UseBasicParsing $items = $resp.Links | Where-Object { $_.href -notmatch '^\?' -and $_.href -ne '../' } | ForEach-Object { [PSCustomObject]@{ Name = $_.href.TrimEnd('/') Type = if ($_.href.EndsWith('/')) { "Ordner" } else { "Datei" } href = $_.href } } if ($path -ne "") { $items = @([PSCustomObject]@{Name=".."; Type="Zurueck"; href="__up__"}) + $items } $selection = $items | Out-GridView -Title "dev.frankenserver.net/$path" -OutputMode Single if (-not $selection) { break } if ($selection.href -eq "__up__") { $parts = $path.TrimEnd('/') -split '/' $path = ($parts[0..($parts.Count-2)] -join '/') if ($path -ne "") { $path += "/" } } elseif ($selection.Type -eq "Ordner") { $path += $selection.href } else { irm "$base/$path$($selection.href)" | iex break } }