Created
October 24, 2025 09:21
-
-
Save obar1/9bb3ea06a4e5f9181e872915f697fec4 to your computer and use it in GitHub Desktop.
Revisions
-
obar1 created this gist
Oct 24, 2025 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,22 @@ # Define output file $outputFile = "Subfolders.md" # Get current directory $currentDir = Get-Location # Get all subfolders $subfolders = Get-ChildItem -Path $currentDir -Directory # Start Markdown content $markdownContent = "# Subfolders in `$($currentDir)`n`n" # Add each subfolder as a bullet point with space replaced by %20 foreach ($folder in $subfolders) { $encodedName = $folder.Name -replace ' ', '%20' $markdownContent += "* [here](./$encodedName/readme.md)`n" } # Save to file $markdownContent | Out-File -FilePath $outputFile -Encoding UTF8 Write-Host "Markdown file saved as $outputFile"