update summary.ps1
This commit is contained in:
parent
4bbc7c8c80
commit
607516293e
19
summary.ps1
19
summary.ps1
|
@ -3,13 +3,28 @@ $summaryFile = Join-Path -Path $folderPath -ChildPath "SUMMARY.md"
|
|||
|
||||
# 指定要排除的文件夹列表
|
||||
$excludedFolders = @("images")
|
||||
|
||||
# 指定要排除的文件类型
|
||||
$excludedExtensions = @(".png", ".ps1")
|
||||
|
||||
# 指定要排除的文件列表
|
||||
$excludedFiles = @("SUMMARY.md")
|
||||
|
||||
#文件名称检查
|
||||
# 获取所有的文件
|
||||
Get-ChildItem -Path $folderPath -Recurse -File | ForEach-Object {
|
||||
$newname = $_.Name.Replace(" ", "") # 将文件名中的空格替换为空格
|
||||
if ($newname -ne $_.Name) { # 如果文件名发生了更改
|
||||
Rename-Item -Path $_.FullName -NewName $newname
|
||||
}
|
||||
}
|
||||
|
||||
# 获取所有的文件夹
|
||||
Get-ChildItem -Path $folderPath -Recurse -Directory | ForEach-Object {
|
||||
$newname = $_.Name.Replace(" ", "") # 将文件夹名中的空格替换为空格
|
||||
if ($newname -ne $_.Name) { # 如果文件夹名发生了更改
|
||||
Rename-Item -Path $_.FullName -NewName $newname
|
||||
}
|
||||
}
|
||||
|
||||
function GenerateSummary {
|
||||
param (
|
||||
[string]$path,
|
||||
|
|
Loading…
Reference in New Issue