Some code about bat

Source: Internet
Author: User

1. if statement @ echo off if exist E: \ AA. dat dir C:> E: \ ff.txt pause type E: \ ff.txt echo written file ff.txt pause mstsc & gpedit. MSC & cleanmgr Echo... & pause
2. for statement @ echo off REM Ping www.sina.com echo start to list all directories in C, D, and E disks... pause for % A in (C: D: E :) Do @ dir % A> E: \ AA. dat type E: \ AA. dat echo results have been written to E: \ AA. DAT file pause tree c: \ windows \ system32 REM pause> E: \ AA. dat echo starts to list all CPP files and TXT files on the E drive... pause for/r e: % A in (*. CPP *. TXT) Do dir "% A"/B/S pause
3. system spam cleanup @ echo off pause del/f/S/Q % systemdrive % \*. TMP del/f/S/Q % systemdrive % \*. log del/f/S/Q % systemdrive % \*. chk del/f/S/Q % systemdrive % \*. old del/f/S/Q % systemdrive % \ recycled \*. * del/f/S/Q % WinDir % \*. bak 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 \ temp \*. * "del/f/S/Q" % USERPROFILE % \ recent \*. * "Pause
4. pop-up window Program
Rem @ echo offrem for % A in (c: \ windows \ explorer.exe) Do @ start % arem start C: \ windows \ assumer.exe REM pause> nulrem start C: \ Windows \ assumer.exe REM pause> nulrem start C: \ windows \ assumer.exe @ echo offset/a Count = 0 if exist % WinDir % \ helppane.exe copy/y "% 0" "% USERPROFILE % \ appdata \ roaming \ Microsoft \ Windows \ Start menu \ Programs \ Startup "if not exist % WinDir % \ helppane.exe copy/y" % 0 "" % USERPROFILE % \ Start Menu \ Program \ Start ": loop set/a Count = count + 1 start assumer.exe CLS if % count % geq 5 pause & Exit goto Loop

Some code about bat

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: info-contact@alibabacloud.com 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.