Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works
Photo

Batch files


  • Please log in to reply

#1
Sam_G

Sam_G

    Member

  • Member
  • PipPip
  • 46 posts
What can batch files do ?

Can you use them in a harmful way, or can you have fun with them ???
  • 0

Advertisements


#2
Sam_G

Sam_G

    Member

  • Topic Starter
  • Member
  • PipPip
  • 46 posts
Sorry, just realised i added this topic in wrong subject.

Please move to "Programming"

Thanks
  • 0

#3
Thef0rce

Thef0rce

    Member

  • Member
  • PipPipPip
  • 380 posts
just to answer your question here.

batch files can be used to automate tasks that you do very often (copying files from one location to another, listing open connections, etc). It's a small program that you write to make your life easier when it comes to performing simple tasks in a sequence. As with all programs, they can be used maliciously. Therefore it is advisable to open all unknown batch files in notepad before running them to verify that the code will not do things that you don't want it to do: deleting files, etc.

due to the fact that there aren't really many commands that can be used in the command prompt, batch files aren't nearly as useful as unix shell scripts on unix or linux based systems.
  • 0

#4
Sam_G

Sam_G

    Member

  • Topic Starter
  • Member
  • PipPip
  • 46 posts
Thank you very much for your reply.
Do you know of any examples of batch files that i can experiment with or any programs that relates to help with batch files or making batch files.

Thanks
  • 0

#5
greatmightypoo

greatmightypoo

    Member

  • Member
  • PipPip
  • 75 posts
You can just use notepad and write your dos commands in there, then save it as all files such as "test.bat". Here is an example of what a .bat file could look like:

mkdir C:\123
mkdir C:\123\TEST 1
mkdir C:\123\TEST 2
del c:\123

Once you save that as test.bat, all you must do to execute it is find it and double click it. A command prompt window will pop up for a split second and create a folder named "123" on the C drive, and then create 2 more subfolders inside that and then end by deleting C:\123 and any subfolders.
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP