windows常用命令(文件操作篇)
阿新 • • 發佈:2018-02-18
bat attr 切換 統計 文件內容 重命名 st3 移動 相對路徑 切換盤符:
查看文件/文件夾:
顯示/隱藏文件/文件夾:
創建文件:
創建文件夾:
復制文件:
復制文件夾:
刪除文件:
刪除文件夾:
重命名文件/文件夾:
移動文件/文件夾:
查找/統計文件:
根目錄:
d:
上級目錄:
cd ..
相對路徑:
cd test
絕對路徑:
cd c:\test
查看當前目錄:
echo %cd%
不含隱藏文件:
dir
隱藏文件:
dir /a
排序:
dir /on
隱藏:
attrib +h test
顯示:
attrib -h test
空文件:
echo. > test.txt
帶內容:
echo abc > test.txt
單個文件夾: md test 多個文件夾: md test1 test2 多級目錄: md test1/test2/test3...
單個:
copy /y a.txt a.txt.back
多個:
copy /y *.txt *.txt.back
不含隱藏文件:
xcopy test1 test2
隱藏文件:
xcopy /h test1 test2
單個:
del /q a.txt
多個:
del /q *.txt
rd /s /q test
單個:
move a aa
多個:
ren *.txt *.bat
move /y test1 test2
顯示行號: find /n "str" test.txt 統計行數: find /c "str" test.txt 查看文件內容: findstr "." test.txt
windows常用命令(文件操作篇)