diff --git a/CHANGELOG_macOS_IntuneToolkit.md b/CHANGELOG_macOS_IntuneToolkit.md index 3fb8f9b..6db3cda 100644 --- a/CHANGELOG_macOS_IntuneToolkit.md +++ b/CHANGELOG_macOS_IntuneToolkit.md @@ -1,5 +1,11 @@ # macOS Intune Toolkit Changelog +## 2026-11-24 — v4.4.3 — Create new folder in folder browser + +### Added +- **`Scripts/Private/Start-IntuneManagementTui.ps1`** + - `Select-FolderPath` has a new **[Create new folder]** entry. It asks for a name, creates the folder inside the current one and moves into it. Invalid names and creation errors are reported without leaving the browser. + ## 2026-11-24 — v4.4.2 — Export built-in Intune roles, fix ASCII header failure ### Fixed diff --git a/Scripts/Private/Start-IntuneManagementTui.ps1 b/Scripts/Private/Start-IntuneManagementTui.ps1 index e24bb55..229ea77 100644 --- a/Scripts/Private/Start-IntuneManagementTui.ps1 +++ b/Scripts/Private/Start-IntuneManagementTui.ps1 @@ -123,7 +123,7 @@ function Select-FolderPath while($true) { - $entries = @("[Use this folder]", "[Type path manually]") + $entries = @("[Use this folder]", "[Create new folder]", "[Type path manually]") $parent = Split-Path -Path $current -Parent if($parent) { $entries += ".." } $subdirs = Get-ChildItem -LiteralPath $current -Directory -ErrorAction SilentlyContinue | Sort-Object Name | ForEach-Object { "$($_.Name)/" } @@ -135,6 +135,15 @@ function Select-FolderPath switch ($choice) { "[Use this folder]" { return $current } + "[Create new folder]" { + $name = (Read-Host "New folder name (inside $current)").Trim() + if([string]::IsNullOrWhiteSpace($name)) { continue } + if($name.IndexOfAny([IO.Path]::GetInvalidFileNameChars()) -ge 0) { Write-Host "Invalid folder name." -ForegroundColor Yellow; continue } + $newPath = Join-Path $current $name + try { New-Item -ItemType Directory -Path $newPath -Force -ErrorAction Stop | Out-Null; $current = $newPath } + catch { Write-Host "Could not create folder: $($_.Exception.Message)" -ForegroundColor Yellow } + continue + } "[Type path manually]" { $typed = Read-Host "Enter path"; if(-not [string]::IsNullOrWhiteSpace($typed)) { return $typed }; continue } ".." { $current = $parent; continue } default { $current = Join-Path $current ($choice.TrimEnd('/')); continue }