File tree Expand file tree Collapse file tree 1 file changed +17
-2
lines changed Expand file tree Collapse file tree 1 file changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -3,13 +3,28 @@ $summaryFile = Join-Path -Path $folderPath -ChildPath "SUMMARY.md"
3
3
4
4
# 指定要排除的文件夹列表
5
5
$excludedFolders = @ (" images" )
6
-
7
6
# 指定要排除的文件类型
8
7
$excludedExtensions = @ (" .png" , " .ps1" )
9
-
10
8
# 指定要排除的文件列表
11
9
$excludedFiles = @ (" SUMMARY.md" )
12
10
11
+ # 文件名称检查
12
+ # 获取所有的文件
13
+ Get-ChildItem - Path $folderPath - Recurse - File | ForEach-Object {
14
+ $newname = $_.Name.Replace (" " , " " ) # 将文件名中的空格替换为空格
15
+ if ($newname -ne $_.Name ) { # 如果文件名发生了更改
16
+ Rename-Item - Path $_.FullName - NewName $newname
17
+ }
18
+ }
19
+
20
+ # 获取所有的文件夹
21
+ Get-ChildItem - Path $folderPath - Recurse - Directory | ForEach-Object {
22
+ $newname = $_.Name.Replace (" " , " " ) # 将文件夹名中的空格替换为空格
23
+ if ($newname -ne $_.Name ) { # 如果文件夹名发生了更改
24
+ Rename-Item - Path $_.FullName - NewName $newname
25
+ }
26
+ }
27
+
13
28
function GenerateSummary {
14
29
param (
15
30
[string ]$path ,
You can’t perform that action at this time.
0 commit comments