1. 首页
  2. 数据库
  3. 其它
  4. Windows下powershell获取指定文件夹和文件大小

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

上传者: 2021-01-17 00:00:40上传 PDF文件 23.81KB 热度 13次
将以下脚本命名为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)
下载地址
用户评论