Powershell

大小写不敏感:get-host=Get Host
执行exe/bat文件:.\filename
清除行: esc
自动提示:tab
get-process: 查看当前服务列表
重命名:Rename-Item FileName -NewName NewFileName
获取当前位置:get-location
打开资源文件位置:explorer .
批量重命名:
$i = 0
Get-ChildItem -Path c:\pictures -Filter *.jpg |
ForEach-Object {
$extension = $_.Extension
$newName = 'pic_{0:d6}{1}' -f $i, $extension
$i++
Rename-Item -Path $_.FullName -NewName $newName
}

新建文件:

type > %~dp0\a.txt
//or
echo a 2>FileName

 

posted @ 2017-12-02 14:49  maoriaty  阅读(82)  评论(0编辑  收藏  举报