I can't understand you maintioned code my ip is 192.168.0.6 and subnet mask is 255.255.255.0 so how to create batch file please help me
...Thanks you.
I can't understand you maintioned code my ip is 192.168.0.6 and subnet mask is 255.255.255.0 so how to create batch file please help me
...Thanks you.
here is some help try it
Creating a batch file to find and delete certain files
How to create batch for RAR file extension
- Open up Notepad in Windows. You can do this by navigating to Start > Programs > Accessories > Notepad, or simply by entering notepad under Start > Run.
- Or open up notepad by C:\WINDOWS\system32\notepad.exe
- Save your file before anything, so be sure to follow the instructions closely.
- Go to File > Save As... and chose a file name.
- Choose your desktop as the location to save, for now. Don't click Save just yet.
- Click on the dropdown menu next to "File name". Select "All files" instead of Text Document".
- Add .bat to the end of your file name before you save. For example, you would type example.bat.
- Click on Save. If you did this correctly, you should see your file name in the title of Windows Notepad. Make sure that it reads as example.bat—not example.bat.txt. Now you are ready to create your batch file.
- Type "@echo off" on the first line of your batch file. This will prevent any spaces in the batch file to be read by the program when executed.
- Enter your commands. The following example below will show you how to create a batch file that will automatically load site using Internet Explorer.
- @echo off.
- REM The following will open site in a new Internet Explorer window.
- "start Iexplore.exe site name"
- REM The following will open site in your default browser, but if it is IE and you have another IE window open, then it will hijack that window.
- "start sitename"
- Save the file by going to "File>Save" and type in "site name.bat".
- Run the file by double clicking the file on your desktop.
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.
What does the batch file do? The first line has the command cls. cls clears the screen window of any previous data. The next three lines start with REM for "remark." Lines beginning with REM do not contain commands, but instructions or messages that will be displayed for the user. The next two lines begin with the command deltree, deltree not only deletes files but directories and sub-directories. In this case the file is deleting the directory cookies and all the files inside. This directory is automatically rebuilt. The deltree has been passed the parameter /y, this informs the process to answer "YES" to any confirmation questions. Sometimes you type the DEL or one of its cousins, the system will ask "Are sure you want to do this?" setting /y answers these prompts without interrupting the process. The pause command halts the process temporarily and shows the users a list of all the files being deleted. cls clears the screen again, another REM line tells the user that the files are deleted. The last line contains only :end and returns the process to the command prompt. This version was created to show the user everything that is taking place in the process. The version bellow does the same thing without showing the user any details.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!
cls
@echo off
deltree /y c:\windows\cookies\*.*
deltree /y c:\windows\tempor~1\*.*
cls
Without REM lines there are no comments. The @echo off command keeps the process from being "echoed" in the DOS window, and without the pause and :end lines, the process runs and exits without prompting the user. In a process this small it is okay to have it be invisible to the user. With more a complex process, more visual feedback is needed. In computing there is fine line between too much and too little information. When in doubt give the user the opportunity to see what is going on.
This version is a little more through, deletes alot of junk
"C:\windows\history\today" will rebuld itself if you delete it. It's not a file, it's a specially configured directory structure that DOS doesn't see the same way that windows does. C:\windows\history\today doesn't actually exist as DOS sees it. Go into the C:\windows\history directory and type DIR/A this will show you the hidden directories and how they are named.cls
@ECHO OFF
ECHO. ***********************************
ECHO. ** Clean Cookies and Temp Files **
ECHO. ** Will not work in NT **
ECHO. *******************************
deltree /y c:\windows\cookies\*.*
deltree /y c:\windows\tempor~1\*.*
deltree /y c:\progra~1\Netscape\Users\default\Cache\*.jpg
deltree /y c:\progra~1\Netscape\Users\default\Cache\*.gif
deltree /y c:\progra~1\Netscape\Users\default\Cache\*.htm
deltree /y c:\progra~1\Netscape\Users\default\archive\*.htm
deltree /y c:\progra~1\Netscape\Users\default\archive\*.gif
deltree /y c:\progra~1\Netscape\Users\default\archive\*.jpg
deltree /y c:\windows\temp\*.*
deltree /y c:\temp\*.*
deltree /y c:\windows\Recent\*.*
deltree /y c:\recycled\*.*
cls
EXIT
WINNT Version
Add these lines for XP@ECHO OFF
ECHO **************************************************
ECHO ** DEL replaces DELTREE, /Q replaces /Y **
ECHO **************************************************
del /Q c:\docume~1\alluse~1\Cookies\*.*
REM Change alluse~1 in the above line to your userID
del /q c:\winnt\temp\*.*
del /q c:\temp\*.*
del /q c:\winnt\Recent\*.*
del /q c:\*.chk
EXIT
del /q C:\Windows\Temp\Adware\*.*
del /q C:\Windows\Temp\History\*.*
del /q C:\Windows\Temp\Tempor~1\*.*
del /q C:\Windows\Temp\Cookies\*.*
One thing I do quite often is erase old floppy disks. I might have a stack of them and I don't care what's on them, but I want all the files gone including potential virii(everyone says "viruses" but "virii" is the proper term. Snob!). But I get tired of opening a DOS prompt and typing in the command to format the disk. So I wrote a one line batch file that does it for me. Save it as: "disk_wipe.bat"
format a: /u
Put a disk in the drive and double-click the .bat file icon.
Follow these steps to create either batch file 1 or batch file 2:
1. Download the updates that you require for the Microsoft products that are installed on your computer.
2. Extract the update .msp files for each update that uses the OHotfix bootstrap utility.
3. Create a new folder named GDIPlus on the C:\ partition.
4. Copy all the required files, including the multiple .msp update files, in the GDIPlus folder that you created in step 3.
Note:- The required files for batch file 1 are listed in the "Information for sample batch file 1, the GDIPlusWin2k.bat file" section, and the required files for batch file 2 are listed in the "Information for sample batch file 2, the GDIPlusWinXP.bat file" section.
5. Make sure that you copy the following three files that are used by the OHotfix bootstrap utility in the GDIPlus folder:
- The OHotfix.exe file
- The OHotfix.ini file
- The OHotfixr.dll file
6. Manually modify the OHotfix.ini file to enable verbose logging and quiet install. See the OHotfix.ini settings that are included in the batch file text later in this article.
Note OHotfix log files are stored at the following location:c:\Documents and Settings\%Username%\Local Settings\Temp\OHotfix
7. Create batch file 1 or batch file 2 by copying and pasting the appropriate script contents that follow these steps.
8. Confirm that the minimum requirements are met for all installed Microsoft products.
9. Run the batch file from a command-line or from System Management Software (SMS).
10. Use the Microsoft Knowledge Base articles that are in the "References" section to confirm that all the Gdiplus.dll and the Mso.dll updates are applied successfully.
I want internet protocol batch file,
for example my office computer IP is 192.168.1.1 and subnet mask is 255.255.255.0 and my home computer ip is other, how to do this code.
Bookmarks