【调试记录】:windows查看一个文件夹下(多个子文件夹)每个子文件夹中文件的数量分别是多少

查看文件夹小所有文件的数量,包括子文件中的文件的数量

bash 复制代码
Get-ChildItem -Path "C:\path\to\your\directory" -Recurse | Measure-Object

查看一个文件夹下多个子文件每个子文件夹中文件的数量分别是多少

bash 复制代码
$targetFolder = "C:\path\to\your\directory" # 替换为你的目标文件夹路径

$subFolders = Get-ChildItem -Path $targetFolder -Directory -Recurse

foreach ($folder in $subFolders) {
    $folderPath = $folder.FullName
    $fileCount = (Get-ChildItem -Path $folderPath -File -Recurse | Measure-Object).Count
    Write-Host "Number of files in $folderPath: $fileCount"
}
相关推荐
私人珍藏库2 小时前
WiFi密码B破器-密码查看器、可跑字典-免费无广
windows·wifi·工具
淮北4949 小时前
windows11配置wsl安装ubuntu20.04
windows·学习·ubuntu·wsl
shykevin12 小时前
uni-app x开发商城系统,商品列表点击跳转至商品详情页
windows·uni-app
std8602113 小时前
微软解除 Win11 限制,“毛玻璃”效果将无处不在
windows
csdn_aspnet13 小时前
如何在 Mac、Ubuntu、CentOS、Windows 上安装 MySQL 客户端
linux·windows·mysql·macos·centos
24kHT14 小时前
conda以及Jupyter notebook的使用
windows·jupyter·conda
alphaTao21 小时前
LeetCode 每日一题 2025/11/3-2025/11/9
windows·leetcode
习惯就好zz1 天前
WSL2 安装Ubuntu卡在安装进度0%无响应问题解决
linux·windows·ubuntu·wsl·wsl2
仰望—星空1 天前
MiniEngine学习笔记 : CommandListManager
c++·windows·笔记·学习·cg·direct3d
ue星空1 天前
Windows内核函数使用
windows