• وبلاگ : پاي سيب
  • يادداشت : Cellular automaton
  • نظرات : 0 خصوصي ، 80 عمومي
  • ساعت دماسنج

    نام:
    ايميل:
    سايت:
       
    متن پيام :
    حداکثر 2000 حرف
    كد امنيتي:
      
      
     
    + DOS 

    The World of DOS - Creating Batch Files

    Introduction(1)
    History(1)
    DOS/Win3.11/95/98 vs. NT/ME/XP/2000(1)
    Command Index(1)
    Navigating DOS(2)
    Tips and Tricks(2)
    Network/Harware Utilities(3)
    How to make and use bootable floppy disks(3)
    Batch Files(4)
    Creating Batch Files(4)
    Batch file utilities and commands(4)
    BREAK CALL CHOICE CLS ECHO EXIT FOR GOTO IF LASTDRIVE MSCDEX PAUSE REM SET

    The AUTOEXEC.BAT file(4) autoexec.nt config.sys
    Types of Batch and System Files(4)
    Parameters in batch files(4)
    Batch File Library(5)
    Subject Index(5)
    Helpful DOS Links(5)




    Batch Files

    What are batch files? Batch files are not programs, pre se, they are lists of command line instructions that are batched together in one file. For the most part, you could manually type in the lines of a batch file and get the same results, but batch files make this work easy. Batch files do not contain "compiled" code like C++ so they can be opened, copied and edited. They are usually used for simple routines and low-level machine instruction, but they can be very powerful. If you look in your C:\, C:\WINDOWS, or C:\WINNT folder you will see a multitude of .BAT, .SYS, .CFG, .INF and other types. These are all kinds of batch files. This may shock you, but while most applications are writen in Basic or C++ they sit on a mountain of batch files. Batch files are the backbone of the Windows operating system, delete them and you"ve effectively disabled the OS. There is a reason for this. The system batch files on each computer are unique the that computer and change each time a program is loaded. The operating system must have access to these files and be able to add and delete instructions from them.

    Creating Batch files

    Simple instructions

    1. Open a text editor like notepad(NOT word or wordpad)
    2. Type or copy this text:
      @ECHO OFF
      ECHO.
      ECHO This is a batch file
      ECHO.
      PAUSE
      CLS
      EXIT
    3. Save this as batchfile.bat, make sure there is no .txt extension after the .bat
    4. Double-click the file icon

    This is a little batch file I wrote that I use every day. It deletes the cookies that get dumped to my hard drive every time I go online. I could set my browser preferences not to accept cookies, but sometimes cookies are useful. Some CGI pages are unusable with cookies, sometimes when you enter a password for a Website, the site uses a cookie to remember your password. I just do not need hundreds of cookie files taking up space after I close my browser. With this batch file, all I have to do is double-click it and it deletes my cookies. Feel free to cut and paste this code to your Notepad or Wordpad. Save it as cookiekill.bat on your Desktop.


    cls
    REM *******************************************
    REM **Cookie Kill Program Will not work in NT**
    REM *******************************************

    deltree /y c:\windows\cookies\*.*
    deltree /y c:\windows\tempor~1\*.*
    pause
    cls
    REM Cookies deleted!