1. PowerShell
get-host
$host.version
new-item FILENAME.xxx -type file
new-item DIRECTORYNAME -type directory
new-item TARGETDIR FILENAME.xxx -type file
Rename-Item c:/scripts/Test.txt new_name.txt
Move-Item c:\scripts\test.zip c:\testX
remove-item file
get-content 1.txt
get-psdriver
powershell -Command "(New-Object Net.WebClient).DownloadFile('https://ts', './src/ts')"
打开控制面板 -> Change date,time,or number -> 打开 “Region” 对话框
选择 Administrative 选项卡,点击 change system locale
选择
2. Cmd
where cmd #类似Linux中where 命令
find /r 目录名 %变量名 in (匹配模式1,匹配模式2) do 命令
for /r 目录名 %i in (匹配模式1,匹配模式2) do @echo %i
for /r TestDir %i in (*) do @echo %i #将TestDir目录及所有子目录中所有的文件列举出来
for /r TestDir %i in (*.txt) do @echo %i #在TestDir目录所有子目录中找出所有的txt文件
for /r TestDir %i in (.txt,.jpg) do @echo %i #找出所有的txt及jpg文件
for /r TestDir %i in (test) do @echo %i #找出所有文件名中包含test的文件
Tree #罗列文件目录