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

Batch files
Started by
Sam_G
, Mar 26 2006 10:43 PM
#1
Posted 26 March 2006 - 10:43 PM

Can you use them in a harmful way, or can you have fun with them ???
#2
Posted 26 March 2006 - 10:48 PM

Sorry, just realised i added this topic in wrong subject.
Please move to "Programming"
Thanks
Please move to "Programming"
Thanks
#3
Posted 27 March 2006 - 02:46 PM

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.
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.
#4
Posted 29 March 2006 - 08:24 PM

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
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
#5
Posted 29 March 2006 - 09:41 PM

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:
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.
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.
Similar Topics
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users
As Featured On:






