来一个 保存为 xxx.ps1 右键在powershell 中运行- $txt= get-date -Uformat "%Y年-%m月-%d日"
- mkdir "e:\备份\$txt" -force
- get-date -Uformat "开始时间 $txt %H:%M:%S"|ac "e:\备份\$txt.log" -force -enc utf8
- copy "d:\新新" -destination "e:\备份\$txt" -Recurse -force
- get-date -Uformat "结束时间 $txt %H:%M:%S"|ac "e:\备份\$txt.log" -force -enc utf8
- pause
复制代码
|