PDA

View Full Version : Batch Files


able
06-02-04, 14:39
Hi I am trying to learn how to make a batch file. Bare in mind that I have no programing experience. I want to copy a file from one folder and put it into another. Basicly I do not know where to start and the tutorials I have read are not very helpful. If someone could give me a step by step and I see the basic procedures I will be able to figure out how. Thank you.

Kodo
06-02-04, 20:52
start with opening notepad. It is the simplest program to use. It's just a plain jane text editor.

Your copy procedure logically goes this way:

Take file A at location A and copy it to file A at location B.

Notice that I actually said to copy it to file A at location B not just copy to location B because you can actually rename it on the move. This is optional but should be noted.

Here's a basic example:

Copy C:\myfile.doc C:\newfolder

Copy tells the command interpreter to get ready to make a duplicate and then the parameters tell it to take it from C:\ with the file name MYFILE.DOC and put the duplicate file in a folder called NEWFOLDER on the C: drive.

It doesn't get much easier than that .

if you go to start...run..type command (for win9x) or CMD(for NT/2000/XP/2003) and hit enter then type COPY /? and hit enter, it will display a help file.

Ciz
06-02-04, 21:06
just to add to that, the text file should be saved as "<filename>.bat"

:D

Kodo
06-03-04, 21:52
damn..can't believe I left that out..