Freedom wrote some batch processing _dos/bat

Source: Internet
Author: User
Tags goto
Process Management Batch miniaturized version (almost the earliest)
Copy Code code as follows:

@echo off
Title Process Management
Color 3F
echo Process Management Batch miniaturized version
Echo Lxsea Freedom
Echo applies to simple operations that cannot be opened by Task Manager and normal virus judgments
Color B1
Echo Saves the data (the. csv file will be generated in this directory)
echo If you have previously saved the data will be compared to the current and previous data, please note the comparison results
Echo updates the process's files every time it is used
Echo's second use will change the tasklist1 to Tasklist0, and the next time the tasklist0 will be deleted and the cycle
If exist tasklist0.csv del/q tasklist0.csv
If exist tasklist1.csv ren tasklist1.csv tasklist0.csv
If exist Tasklist0.csv FC Tasklist1.csv Tasklist0.csv
echo stop process ends with PID
echo Process ID can look at the data in the table
Echo Stop is in danger, please choose carefully.
echo If you do not want to operate please close directly
Color FC
Set output=
set/p enter= please input PID:
Ntsd-c q-p%enter%
Echo Welcome to the ideal Technology forum
: End

This is a batch for comparing files (now looks naïve):
Copy Code code as follows:

@echo off
Color FC
Title Check DLL files and exe files under C:\WINDOWS\system32
Echo. -------------------------------------------------------------------------------
Echo. Check
Echo. DLL files and exe files under C:\WINDOWS\system32
Echo. Made by base pull freedom
Echo. Welcome to
Echo. -------------------------------------------------------------------------------
Echo. The first run will produce a 0.txt record exe and DLL file
Echo. The second time will produce 1.txt and automatically compare to 0.txt
Echo. Used to determine whether new files are generated
Echo. This is because System32 loves hiding spots for viruses.
If not exist 0.txt Goto begin
REM judge whether there are 0.txt
If exist 1.txt del 1.txt
REM judge whether there are 1.txt there is deleted
ren 0.txt 1.txt
REM Changes 0.txt to 1.txt
: Begin
Dir/b/a:c:\windows\system32\*.exe >0.txt & dir/b/a:c:\windows\system32\*.dll >>0.txt
REM above/A: is the meaning of displaying all files
set/p= <nul
FOR/L%%i in (1 1) do set/p a= <nul&ping/n 1>nul
echo 100%%
IF ERRORLEVEL 1 echo Failed Maybe your system is not installed in the C disk
IF ERRORLEVEL 0 Echo was successfully created
If not exist 1.txt Goto end
set/p s= Press ENTER for file comparison
Color 8F
Echo. The variance appears (for example):
Echo. 0.txt---------File 0.txt
Echo. 1.TXT---------File 1.txt
Echo. 123.dll-------------file 0.txt is different from 1.txt
Echo. 12.exe--------------file 0.txt is different from 1.txt
Echo. ---------------except for 1.txt and 0.txt.
Echo. Description 0.txt and 1.txt different is 0.txt more 123.dll and 12.exe These two files this is to be noted!
set/p j= Press ENTER to start
FC 0.txt 1.txt
: End
set/p = Press ENTER to exit

Looking for files (this is casual play ...). In fact, use p to find a file not so annoying
Copy Code code as follows:

:: Code by Freedom @www.
:: Made in 2009_7_2
@echo off
Setlocal enabledelayedexpansion
Goto NEW
: Start
Set o=
Set j=
Set wen=
set/p cc=
: New
echo helps you find files
Echo 1. View a list of files (view only the current directory)
Echo 2. Open file (current directory and internal)
set/p j= Please enter the letter ordinal (press ENTER to exit directly):
If%j% equ 1 goto:fin
If%j% NEQ 2 echo serial error &cls&goto:start
: Wen
for/f "delims="%%a in (' dir/b/s ') do echo%%a >>1.txt
set/p wen= What's the file you're looking for?
for/f "eol=-"%%i in (' Find '%wen% ' 1.txt ') to do echo file location:%%i&start%%i
set/p o= continue to find Files (y/n):
if/i%o%== "Y" Goto:wen
Del 1.txt/q
Goto Start
: Fin
set/p o= whether to find Files (y/n):
if/i%o%==y Goto:wen Else Goto:fin
if/i%o%==n Goto:start

This is the most recently written prohibit the program to run with the Ws2_32.dll method Ifeo lazy to write ...
Copy Code code as follows:

:: Madeby Freedom Batch Processing house 20090812
@echo off&setlocal enabledelayedexpansion
Title use Ws2_32.dll to block file run batch Home
Echo uses Ws2_32.dll blocker to run
The Echo program is not perfect, just tired of Ifeo.
ECHO is not valid for green programs or for not calling this DLL
: New
echo 1. Disabling programs
echo 2. View disabled list
Echo 3. Remove Disable Program
Set cho=
set/p cho= Input 1~3:
If%cho% equ 1 goto MDD
If%cho% equ 2 goto viewd
If%cho% equ 3 goto Deld
Echo, you're not typing.
Goto NEW
: QS
Echo's got it, and you're kidding me. Change the address.
Set place=
: Check
set/p place= the directory address (such as D:\exe) where the input file is located:
If exist C:\bad find "%place%" C:\bad.txt>nul &&goto QS
If not exist "%place%" goto check
MD "%place%" \WS2_32.DLL\FR. \
Echo's established, ~~~~~~.
Goto NEW
: Bads
Echo does not have this program hey, look at the table.
: viewd
If not exist "C:\bad.txt" Goto WRO
Type C:\bad.txt
Goto NEW
: Wro
echo you have not run this program or the document has been lost sorry AH ~ ~
Goto NEW
:d Eld
Set kill=
set/p kill= Enter the path of the program you want to delete:
Find "%kill%" C:\bad.txt>nul | | Goto Bads
Rd "%kill%\ws2_32.dll"/s/q
Echo. >tem.txt
@for/F "tokens=* delims="%%i in (' findstr/i/v/c:%kill% c:\bad.txt ') does (
Set var=%%i
Copy tem.txt C:\bad.txt >nul
Echo's done.
Goto NEW

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.