1..f:切换到f盘
dir显示目录
dir c:\windows| more
dir /a 浏览所有文件(包括隐藏文件)
cls 清屏
2.创建文件:
echo hello world > test.txt 网文件里写入一句话
> 覆盖 >> 追加
type test.txt | more 查看文件里的信息(分页)
copy con test.txt
内容
ctrl+z
3.复制文件 copy 路径\源文件名 目标路径\新文件名
copy test.txt ..\demo\ 将当前路径下的文件复制到demo
文件中
copy f:\a\test.txt .\ 将a文件夹里的文件复制到当前文件夹里
4.重命名问价 ren 旧名 新名
5.移动文件 move 路径\源文件名 目标路径\新文件名
4.删除文件 del test.txt
del *.txt *通配符
del *.* /q 不提示直接删除
5. md test 创建文件夹
6. attrib +h test 隐藏文件
attrib -h test 取消隐藏文件
attrib +h +s +a test 隐藏文件、受系统保护、不可
7. 创建指定大小的测试文件
fsutil file createnew f:\system.ini 4096000000
同时将文件隐藏
attrib +s +a +h system.ini
8.assoc .txt=exefile 修改关联性 ,将.txt修改为exe
assoc .txt=txtfile
9.shutdown -s -t 100 关机
shutdown -r -t 100 重启
shutdown -l 注销
shutdown -s -t -f 100 强制关机
shutdown -s -t -f 100 -c "哈哈"
shoutdown -a 取消一切定时
基本的DOS命令
最新推荐文章于 2022-07-19 14:25:35 发布