Warning! Any computer manipulate in is done at your risk!
NOTE: The information shared in this applies to Windows 10, Windows 8.1 and Windows 7. Note that, for simplicity, we will use screenshots taken only in Windows 10
NOTE: Command Prompt is not case sensitive, meaning that commands can be typed with capital letters, lowercase or any combination of them. The commands CD, cd or Cd will all work in the same way.
OK so we have seen a few basics command now let’s rename a files and folder, copy files and folders, and Launch an application.
How to rename files and folders
OK so when we left off we had one folder with one file in the root of where we were working. So to see what we have I have used the tree command. This is fun on I will talk about later.
So let’s start by renaming the folder. By moving to the root of the folder in my case being H: and running the ren command. So I would Type: h: (Then Press Enter), then Type: ren x86_Root x86_Root_Ren (Then Press Enter). This would give me the below, notice I ran a dir to show he change.
So as you can see the folder x86_Root has been renamed. So know lets change the files name Hello.txt to Hello_Ren.txt So I Type: cd: x86_Root_Ren (Then Press Enter), Then Type: ren Hello.txt Hello_Ren.txt(Then Press Enter). I then run a dir command to see the change.
Copy files and folders
Now let’s do some copying first Type: cd .. (Then Press Enter), and then Type: cls (Then Press Enter) to clear the screen. So with this we will be using the copy command and the xcopy command. So for this I am going to make the x86_Copy folder I do this by Typing: md x86_Copy(Then Pressing Enter). You can use the information from part 2 for this step. What I am looking for is your working directory to look like the below.
So now let’s copy Hello_Ren.txt. So to do this you would use copy in the format of copy [drive letter]: [source folder] \ [source file] [destination folder] \ [destination file] so for me it would be
Type: copy h:\x86_Root_Ren\hello_Ren.txt h:\x86_Copy\Hello_Ren.txt (Then Press Enter).
As you can see I made a mistake in my first line of using h:\x86_Copy_Ren as my destination and it gave me an error. I thought it was good to show mistakes happen so don’t be intimidated. Now let’s copy a folder with xcopy.
So to do this you would use xcopy in the format of xcopy [drive letter]: [source folder] [destination folder] so for me it would be.
Type: xcopy h:\x86_Root_Ren h:\x86_Root_Xcopy (Then Press Enter).
As you can see I had to tell the computer I wanted to copy to a folder or Directory.
Launch an application from the Command Prompt
Now let’s run an application! You won’t do this much but it is nice to know so let’s look at a built in MS app we can play with. mspaint.exe is a good one, note there is a file with paths so that if you are trying to run an application that is not in a folder it will look in a path in this file. By default the folder associated with mspaint.exe is in this file so this is not the most accurate but it gets to the point.
So simple go to your CLI and enter the executable in.
In the command prompt I entered mspaint and the paint program started in my Windows.
So in the CLI or Command Prompt Type: mspaint (Then Press Enter).
So that is about it, I purposely left out deleting as this can be very catastrophic if not done correctly. So if it reaches this level get someone that knows to help. I would like to thank anyone that has viewed these and openly ask you to send any feedback to email@example.com. This being my first jump into this type of instruction I have a long way to go, but looking at my post you can see how I have changed and manipulated my format already. So I leave you with this, do what you love and if technology calls you don’t be afraid of it but embrace it. I have years of experience but would have never learned had I not experimented. So thanks everyone and Have a backup…. Have I said that yet?
So as I go I leave you with a tree image from the CLI.