Windows下powershell获取指定文件夹和文件大小

accp_33505 11 0 PDF 2021-01-17 00:01:40

将以下脚本命名为test.ps1, 并在powershell下运行.\test.ps1即可。 #list all folder and file size of specific filepath folder function filesize ([string]$filepath) { if ($filepath -eq $null) { throw file path cannot be blank } $_.name + file size(MB) -f $l | Out-File ($filepath+test.txt)

用户评论
请输入评论内容
评分:
暂无评论