(Batch) Useful batch commands - Printable Version +- howtothings.co.uk (https://www.howtothings.co.uk) +-- Forum: Computing (https://www.howtothings.co.uk/forumdisplay.php?fid=4) +--- Forum: Programming Support, Graphic Design and Tutorials (https://www.howtothings.co.uk/forumdisplay.php?fid=14) +--- Thread: (Batch) Useful batch commands (/showthread.php?tid=8) Pages:
1
2
|
(Batch) Useful batch commands - Mark - 22-05-2010 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%" 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" 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" 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 I hope this has helped. RE: (Batch) Useful batch commands - talentsfromindia - 08-02-2011 Very helpful commands indeed,elementary which are normally required . RE: (Batch) Useful batch commands - Mr. President - 10-02-2011 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 RE: (Batch) Useful batch commands - Drumm - 11-02-2011 On a very important note, why is Marks theme pink? RE: (Batch) Useful batch commands - latch - 11-02-2011 (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? RE: (Batch) Useful batch commands - Drumm - 11-02-2011 And why did he block me on MSN. RE: (Batch) Useful batch commands - latch - 12-02-2011 Prolly cause you are questioning his pinkness! RE: (Batch) Useful batch commands - Pack3t SynAck3r - 12-02-2011 (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 RE: (Batch) Useful batch commands - Drumm - 12-02-2011 Yay <3 I feel loved. RE: (Batch) Useful batch commands - latch - 13-02-2011 (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. Hey, why does Drumm get all that? |