• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
(Batch) Useful batch commands
#1
Useful batch commands


STEP ONE:

In this tutorial you will be learning how to use the following commands:

cd
copy
del
start


STEP TWO:

cd

The cd command is used to navigate to a directory.

For example, if you wanted to navigate to be the desktop the command would be:

cd "%userprofile\Desktop%"


[Image: 5djy48.jpg]

This command is one of the more useful ones to know because it needs to be used in conjunction with the other commands.

STEP THREE:

copy

The copy command allows you to copy a file from one directory to another.

Before you are able to use the copy command, you need to know how to use "cd", this is because you need to be in the directory from which you want to copy the file from.

When using the copy command you need to use it in the following way:

copy "filename" "chosen path to copy the file to"

Where it says "filename", replace it with the name of the file you want to copy and where it says "chosen path to copy the file to", replace that with the directory of where you want the file to be copied to.

For example, if you've got a file called copy.txt that you want to copy to the desktop the code would be:

copy copy.txt "%userprofile%\Desktop"

[Image: i2k5eq.jpg]


STEP FOUR:

del

This del command is used to delete things, it can be used to delete single files or an entire hard drive.

Similar to the copy command, for the "del" command to work you need to cd into the directory where the file is.

When using the del command it takes the following structure:

del "filename"

Where it says "filename" replace that with the name of the file you want to delete.

For example, if you wanted to delete the file delete me.txt then the command would be:

del "delete me.txt"

[Image: 6puqew.jpg]


STEP FIVE:

start

The start command is used to start or open something, it can be a file or a program.

Just like the copy and del commands, for the start command to work you'll need to select a directory using the "cd" command.

Once the directory has been selected you type:

start "filename.extension"

Where it says "filename" replace that with the file you want to start / open - and where it says ".extension" replace that with the file type, eg .exe or .txt

For example, to start Internet Explorer you type:

start iexplore.exe


[Image: 2uqhqaf.jpg]


I hope this has helped.
  Reply
#2
Very helpful commands indeed,elementary which are normally required .
  Reply
#3
Good tutorial! cli is so important not just for hackers but just for using your computer in general, some programs like ruby run alot on cmd. Some *edit* most people don't even know what command prompt is, although i was pretty computer illiterate myself not to long ago so i shouldn't point fingers.

EDIT: 277 views + 2 post = WTF
[Image: bustedtees.07e3d5a3-8bf6-4c9a-8f85-5bccf2e28120.gif]
  Reply
#4
On a very important note, why is Marks theme pink?
[Image: nomnomnom.jpg]
;7$=v?%v%#5>v7v8994
The decrypt code is V, I could not make it any simpler!
  Reply
#5
(11-02-2011, 11:32 PM)Drumm Wrote: On a very important note, why is Marks theme pink?

And why is that dude's arm around him on his facebook page?
Having long hair is great until you have to pull a footlong out of the dog's butt. flatank.blogspot.com
I. AM. LATCH.
  Reply
#6
And why did he block me on MSN.
[Image: nomnomnom.jpg]
;7$=v?%v%#5>v7v8994
The decrypt code is V, I could not make it any simpler!
  Reply
#7
Prolly cause you are questioning his pinkness!
Having long hair is great until you have to pull a footlong out of the dog's butt. flatank.blogspot.com
I. AM. LATCH.
  Reply
#8
(11-02-2011, 11:56 PM)Drumm Wrote: And why did he block me on MSN.

If it makes you feel better Drumm, I might send you a FB invite or give you my Google Talk ID
[Image: icpn5k.jpg]
Trolls are the last thing you need to be concerned with.

VCD Wrote:// Forever more, count and reply, bitch.
  Reply
#9
Yay <3 I feel loved.
[Image: nomnomnom.jpg]
;7$=v?%v%#5>v7v8994
The decrypt code is V, I could not make it any simpler!
  Reply
#10
(12-02-2011, 06:50 AM)Pack3t SynAck3r Wrote:
(11-02-2011, 11:56 PM)Drumm Wrote: And why did he block me on MSN.

If it makes you feel better Drumm, I might send you a FB invite or give you my Google Talk ID

Hey, why does Drumm get all that?
Having long hair is great until you have to pull a footlong out of the dog's butt. flatank.blogspot.com
I. AM. LATCH.
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to make a menu in batch (And start processes) Mark 3 10,607 13-07-2010, 02:34 AM
Last Post: Jamez247
  (Batch) How to shutdown a computer using a batch file Mark 0 6,872 22-05-2010, 10:49 PM
Last Post: Mark
  (Batch) Autostarting programs on login Mark 0 5,411 22-05-2010, 10:44 PM
Last Post: Mark
  (Batch) Hello world - Your first Batch program Mark 0 6,896 22-05-2010, 10:35 PM
Last Post: Mark

Forum Jump: