2525 # Get the path separator for the current OS
2626 $pathSeparator = [System.IO.Path ]::DirectorySeparatorChar
2727
28- $relativeFolderPath = $Path -Replace $RootPath , ' '
29- $relativeFolderPath = $relativeFolderPath -Replace $file.Extension , ' '
28+ $relativeFolderPath = $Path -replace $RootPath , ' '
29+ $relativeFolderPath = $relativeFolderPath -replace $file.Extension , ' '
3030 $relativeFolderPath = $relativeFolderPath.TrimStart ($pathSeparator )
31- $relativeFolderPath = $relativeFolderPath -Split $pathSeparator | ForEach-Object { " [$_ ]" }
32- $relativeFolderPath = $relativeFolderPath -Join ' - '
31+ $relativeFolderPath = $relativeFolderPath -split $pathSeparator | ForEach-Object { " [$_ ]" }
32+ $relativeFolderPath = $relativeFolderPath -join ' - '
3333
3434 Add-Content - Path $RootModuleFilePath - Force - Value @"
3535#region $relativeFolderPath
@@ -38,11 +38,11 @@ Write-Debug "[`$scriptName] - $relativeFolderPath - Processing folder"
3838
3939 $files = $Path | Get-ChildItem - File - Force - Filter ' *.ps1' | Sort-Object - Property FullName
4040 foreach ($file in $files ) {
41- $relativeFilePath = $file.FullName -Replace $RootPath , ' '
42- $relativeFilePath = $relativeFilePath -Replace $file.Extension , ' '
41+ $relativeFilePath = $file.FullName -replace $RootPath , ' '
42+ $relativeFilePath = $relativeFilePath -replace $file.Extension , ' '
4343 $relativeFilePath = $relativeFilePath.TrimStart ($pathSeparator )
44- $relativeFilePath = $relativeFilePath -Split $pathSeparator | ForEach-Object { " [$_ ]" }
45- $relativeFilePath = $relativeFilePath -Join ' - '
44+ $relativeFilePath = $relativeFilePath -split $pathSeparator | ForEach-Object { " [$_ ]" }
45+ $relativeFilePath = $relativeFilePath -join ' - '
4646
4747 Add-Content - Path $RootModuleFilePath - Force - Value @"
4848#region $relativeFilePath
0 commit comments