Pages

Thursday, March 17, 2011

how to create batch files.


Batch file ABCs
Batch files allow MS-DOS and Microsoft Windows users to create a lists of commands to run in sequence once the batch file has been executed. For example, a batch file could be used to run frequently run commands, deleting a series of files, moving files, etc. A simple batch file does not require any special programming skills and can be done by users who have a basic understanding of MS-DOS commands.
A good example of a batch file for someone who is more familiar with Windows or the MacOS is to think of a batch file as ashortcut in Windows or an icon on the MacOS. Much like a shortcut, batch files could be used to run one or more commands or programs through the command line.
Another example of a very well known batch file is the autoexec.bat, which is a simple boot file loaded each time the computer is loaded on MS-DOS and early Windows computers. This batch file contained all the necessary commands and programs used to run MS-DOS and Windows each time the computer booted.
Creating a batch file
MS-DOS users
To create a basic batch file in MS-DOS, follow the below steps that give you an example of how to create a basic batch file.
  1. Open an MS-DOS command window or get to MS-DOS. Additional information about doing this can be found on document CHDOS.
  2. At the MS-DOS prompt, type: edit test.bat and press enter.
  3. If typed properly, you should now be in a blue screen. Within the screen, type:

    pause
    dir c:\windows
    dir c:\windows\system
  4. Once the above three lines have been typed in, click File and choose exit; when prompted to save, click "Yes." Users who do not have a mouse cursor can accomplish this same task by pressing ALT+F to access the file menu, then pressing "X" to exit, and pressing enter to save changes.
  5. Once you are back at the MS-DOS prompt, type: test and press enter. This will execute the test.bat file and begin running the file. Because the first line is pause, you will first be prompted to press a key. Once you press a key the batch file will run line-by-line; in this case, listing the files in the windows and windows\system directories.
If you wish to add more lines to this batch file you would type "edit test.bat" to edit the file again.
Additional information about the MS-DOS edit command can be found on our edit command page. Some versions of MS-DOS and bootable diskettes may not have the edit command; if this is the case, you would either need to obtain the edit.com file to access this file or use the copy con command.
Microsoft Windows and other users
A Windows user can still use the above MS-DOS steps if they wish to create a batch file. If, however, you're more comfortable using Microsoft Windows or your operating system, you can use any text editor, such as Notepad or Wordpad, to create your batch files, as long as the file extension ends with .bat. In the below example we use the Windows notepad to create a batch file.
  1. Click Start
  2. Click Run
  3. Type: notepad and press enter.
  4. Once notepad is open, type the below lines in the file or copy and paste the below lines into notepad.

    @echo off
    echo Hello this is a test batch file
    pause
    dir c:\windows
  5. Click File and click Save; browse to where you want to save the file. For the file name, type "test.bat", and if your version of Windows has a "Save as type" option, choose "All files", otherwise it will save as a text file. Once all of this has been done click the Save button and exit notepad.
  6. Now, to run the batch file, double-click or run the file like any other program. Once the batch file has completed running it will close the window automatically.
Batch commands
Just like all MS-DOS commands, all batch file commands are not case sensitive. However, in the below listing we have listed all commands in all caps to help you identify what is a command and what is not.
@Does not echo back the text after the at symbol. This is most commonly used as @ECHO OFF to prevent any of the commands in the batch file from being displayed, just the information needed.
%1The percent followed by a numeric value, beginning with one, allows users to add variables within a batch file. The below line is an example of what can be used in a batch file.ECHO Hello %1
When the above one-line batch file is created, add your name after the batch file. For example, typing myname (being the name of the bat file) and then your name:
myname bob
would output:
Hello bob
Note: This can be extended to %2, %3, and so on.
::One of two ways of adding remarks into the batch file without displaying or executing that line when the batch file is run.
:LABELBy adding a colon in front of a word, such as LABEL, you create a category, more commonly known as a label. This allows you to skip to certain sections of a batch file such as the end of the batch file. Also see GOTO.
CALLThis is used to run another batch file within a batch file. When the batch file that is called is completed, the remainder of the original batch file is completed. Note if the batch file does not exist it will give an error message.
CHOICESee running different programs for an example of how to use this command.
  • Additional information and the syntax of this command in each version of Windows and MS-DOS can be found on our CHOICE command page.
CLSJust like the DOS command would clear your screen.
  • Additional information and the syntax of this command in each version of Windows and MS-DOS can be found on our CLS command page.
ECHOWill echo a message in the batch file. Such as ECHO Hello World will print Hello World on the screen when executed. However, without @ECHO OFF at the beginning of the batch file you'll also get "ECHO Hello World" and "Hello World." Finally, if you'd just like to create a blank line, type ECHO. adding the period at the end creates an empty line.
EXITExits out of the DOS window if the batch file is running from Windows.
  • Additional information and the syntax of this command in each version of Windows and MS-DOS can be found on our EXIT command page.
GOTO LABELUsed to go to a certain label, such as LABEL. An example of GOTO would be to GOTO END. For an example of this seerunning different programs.
  • Additional information and the syntax of this command in each version of Windows and MS-DOS can be found on our GOTO command page.
IFUsed to check for a certain condition if the condition exists. If that condition exists it will perform that function. To see an example of this see running different programs.
  • Additional information and the syntax of this command in each version of Windows and MS-DOS can be found on our IF command page.
PAUSEPrompt the user to press any key to continue.
REMOne of two ways of adding remarks into the batch file without displaying or executing that line when the batch file is run.
SHIFTChanges the position of replaceable parameters in a batch program.
  • Shift command help and syntax information.
STARTUsed for Windows 95, Windows 98, and Windows NT 4.0 and above to start a windows application; such as START C:\WINDOW\CALC would run the Windows Calculator. Users running Windows 3.x need to utilize the WIN command.  For example, WIN C:\Windows\CALC.EXE would run Windows and then Calculator after Windows has finished loading. 
  • Start command help and syntax information.

How to convert .class file to .java file


The “Java Decompiler project” aims to develop tools in order to decompile and analyze Java 5 “byte code” and the later versions.
JD-Core is a library that reconstructs Java source code from one or more “.class” files. JD-Core may be used to recover lost source code and explore the source of Java runtime libraries. New features of Java 5, such as annotations, generics or type “enum”, are supported. JD-GUI and JD-Eclipse include JD-Core library.
JD-GUI is a standalone graphical utility that displays Java source codes of “.class” files. You can browse the reconstructed source code with the JD-GUI for instant access to methods and fields.
JD-Eclipse is a plug-in for the Eclipse platform. It allows you to display all the Java sources during your debugging process, even if you do not have them all.
JD-Core, JD-GUI and JD-Eclipse are free for non-commercial use. This means that JD-Core, JD-GUI and JD-Eclipse shall not be included or embedded into commercial software products. Nevertheless, these projects may be freely used for personal needs in a commercial or non-commercial environments.



Download 
Size : 691.67 KB
MD5 checksum : 15b3bfb9283bcd3f5db551762f4debeb
Size : 973.8 KB
MD5 checksum : 64491556a81f65b8ad58ef44c5ec99c0
Size : 1.37 MB
MD5 checksum : eb33e74f724d3b0a89ca4002a408ab49


Wednesday, February 9, 2011

Increase your Internet speed


Here’s a simple 3 minute tweak (XP Pro only) that will increase your broadband speed.
By default (even with QoS disabled) Windows XP reserves up to 20 percent of your connections bandwidth.
To override this reserve take the following steps.
Make sure you Log on as Administrator, not as a user with Administrator privileges.
* Start > Run > type gpedit.msc
* You will see [Local Computer Policy]
* Expand the [Administrative Templates] branch
* Expand the [Network] branch
* Highlight [QoS Packet Scheduler]
* Double-click [Limit Reservable Bandwidth]
* Check [Enabled]
* Change [Bandwidth limit %] to 0 %
* Click [Apply] [OK]
* Restart
Effect is immediate.



To speed up the Internet connection speed we need to configure a special buffer in the computer's memory in order to enable it to better deal with interrupts made from the NIC or the USB modem.
This tip is only recommended if you have 256MB RAM or higher.

Step #1 - Identify the IRQ used by the NIC/USB modem

Follow these steps:
  1. Open the System Information tool by running MSINFO32.EXE from the Run command.
  2. Expand System Summary > Hardware Resources > IRQs.
  3. Look for the listing made for your NIC (in my case - a Intel(R) PRO/100+ Management Adapter). Note the IRQ next to the specified line (in my case - IRQ21).

    Step #2 - Modify the system.ini file

    Follow these steps:
    1. Run SYSEDIT.EXE from the Run command.
    2. Expand the system.ini file window.
    3. Scroll down almost to the end of the file till you find a line called [386enh].
    4. Press Enter to make one blank line, and in that line type
    IrqX=4096
    where X is the designated IRQ number we found in step #1, in my case it's IRQ21.
    Note: This line IS CASE SENSITIVE!!!
    1. Click on the File menu, then choose Save.
    2. Close SYSEDIT and reboot your computer.
    Done. Speed improvement will be noticed after the computer reboots.

Tuesday, December 28, 2010

Add more folders to SendTo option

Step 1:
        Open RUN Dailogue box by pressing Windows symbol + r  or Click start->Run.
Step 2:
     Type shell:SendTo.Press Enter/  Click on OK.
Step 3:
   Thats all.Now you can add or delete shortcuts to what ever folder you want.

As simple as it is. he he he ...

Try typing shell:StartUp

Wednesday, November 24, 2010

Install XP in 10 Minutes


As We all know that During Formatting a Computer After the File Copying is Completed then windows Require 39 Minutes Time. We can bypass this time by a simple trick.

It will just take around 9 minutes and 2 minutes for Tolerance(depends System to system).

Install Windows in 10 mins:-
=======================

1) Wait till the copy part is over, when its over system reboots and the below image will appear.


2) Now As This Image APPEARS You Have to Press "Shift + F10 ". This Will Open The command Prompt. Now type "taskmgr" in it to open the Task manager.

3) After The task Manager Opens go to Processes tab and find "Setup.exe" process and Right CLICK on it and set the Priority to Highest.


4) Now just wait and watch your xp install in 10 mins !