Batch File to Copy Files

Sunday, September 18, 2011

Batch File can copy files in computer easily. If we can have a good idea, we can develop to make advance batch tool to copy more files quickly. the following is the basic simple code :
copy D:\LearnBatCode.doc E:\
Other example code from directory to other directory on different drive:
copy D:\PrivatDirectory\LearnBatCode.doc E:\NewDirectory
Write it into Notepad, then save it and give .bat extension, example: copyFiles.bat you can combine this code with more batch/cmd code, like a rename files.
Read More..

Auto Shutdown Computer After 3 Hour with Batch

Wednesday, September 7, 2011

It's easy to make computer restart or auto shutdown after 3 hour with cmd code, you just write simple code in batch file. Write down following codes in notepad :

shutdown -s -t 10800 -t “Hi ! This Computer will shutdown After 3 hour”

Save it with .bat extension (ex: Autoshudown.bat ), and run the program with double click on it. The words in quotes is display comment that will be shown when program is running. 10800 is the time for 3 hour (3600=1 hour), you may need read the basic shutdown command
Read More..

Batch to Rename Files

Saturday, February 26, 2011

Usually we rename files on windows computer by click right on the files or press F2 then type a new files name. In this basic tutorial, we try to do it with a batch commands.

CMD rename code:
RENAME [drive:][path]filename1 filename2
REN [drive:][path]filename1 filename2
you can use RENAME or REN code, example :
REN D:\oldFilesName.doc newFilesName.doc
Batch rename code:
@echo off
title Batch Renamer
ren D:\oldFilesName.doc newFilesName.doc
echo rename is done !
echo press any key to exit
pause>nul
after knowing this basic rename code, you can modify more expert code to make batch renamer tool, and I'll make it more smart renamer tool later. hope it's useful for you.
Read More..

Windows Shutdown Command

Friday, February 25, 2011

It's easy to shutdown windows computer with CMD command. you just need simple codes into command prompt (CMD) screen, or you can make it as shutdown tool with .bat application, the following is the command code :
shutdown -s -t 3600 -c "computer will shutdown automatically"
explanation
Shutdown : to shudown computer
-s : set shutdown
-t 3600 : set the time-out period before shutdown to 3600 seconds.
-c "comment" : set or display comment on CMD screen.

Code to make .bat application:

@echo off
title shutdown windows tool
shutdown -s -t 3600
pause>nul
it's basic CMD shutdown code. I hope it's useful to make windows shutdown tool with CMD command. I'll give the expert tutor for automatic shutdown computer next time.
Read More..

CMD Commands

Wednesday, February 23, 2011

With commands of CMD (command prompt) we can make a batch file to create useful windows tool or program, the following are the basic CMD commands :
COPY - Copies one or more files to another location
DEL - Deletes one or more files
ATTRIB - Display or changes file attributes
MD - Make a directory
RD - Removes a directory
REN - Renames file or files
it's all some basic codes usually used for make windows tool, to know more commands you can see on CMD screen by typing help.

Open Start - All Programs - Accessories - Command Prompt, then type the word help there. Or you can press Windows Logo+R on keyboard then type CMD on Run box that appear.
Read More..

How to Make a Batch File

This is an introduction before I create some command prompt commands (CMD) tutorial in this blog. How to Make a Batch File ? sure, I thinks it's a good for first title in this blog. okay, following the steps to make batch file on windows computer :
  • Open Notepad
    (on Start- All program -Accessories - Notepad)
  • write down your command Prompt commands (CMD), example:
    @echo off
    Title this is my first CMD program
    echo Hi world ! I'm coming
    pause>nul
  • Save it with .bat extension
    (example: myProgram.bat )
  • Double click on the file "myProgram.bat" and see how program will run.
okay, I hope it's useful for you to understand how to make a batch file. so,then you only need the CMD codes to make a batch program.
Read More..