How to use the following useful Windows batch commands:
cd
copy
del
start


STEP ONE:
cd

The cd command is used to navigate / change in 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 TWO:
copy

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


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 command would be:

copy copy.txt “%userprofile%\Desktop”

STEP THREE:
del

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

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 a file called delete-me.txt then the command would be:

del “delete-me.txt”

STEP FOUR:
start

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

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