Accessing and Copying files via Windows CMD

Recently my laptop dropped, and I got the deadly "Check Hard Drive" message.

Too bad I couldn't strangle the cause - my 2 month old baby, who just smiled sweetly at my scream of horror and shocked facial expression. And you guessed right, I forgot to back up for about 8 months - let's just say, since I knew I was pregnant.

I walked around under a cloud of disbelief and shock for 3 days while Vicky went about trying to fix the situation.

 

On the fourth day, I was presented with my laptop, this time with another hard disk in it, and my old hard disk sitting in a disk reader case, to be accessed like an external hard drive.

Hard Disk ProblemMy relief was shortlived, as I had to start downloading and installing drivers  - to even see or run the hard drive, I had to do a lot of Windows updates. Needless to say, my data usage has shot up drastically during this period.

 

Anyway, I found out that I could not open the former C drive on the Hard Drive. Even though I usually saved my files in a separate drive, there were many relevant files I needed that were sitting in the C drive and laughing at my efforts via Windows Explorer.

 

So I turned to my best friend Google for help. I turned up these golden steps that I followed, from different sources, that helped me copy out files and folders smoothly:

 

1. Access your COMMAND PROMPT as an Administrator, and go to the folder you want to copy files [and folders] from. To do this, right-click the Command Prompt name in the Start Menu, and select "run as administrator".

2. Note the destination path you have in mind. 

3. If you want to copy the whole contents in the folder, type:

robocopy . [destinationfolder] /e

This ensures all files AND subfolders are copied from source to destination. If you want just the files, skip this part: /e

4. Do the Victory dance while robocopy does its magic. It will give you a report while running and when done.

5. If you want to exclude a folder from the action, add this to your command: /xd dirs [foldername]

6. If you want to exclude a file from the action, add this to your command: /xf file [filename]

7. If it is just one file or folder you want to copy, type: robocopy [sourcefolderpath] [destinationfolderpath] filetobemoved.jpg

8. If your file name has spaces in it, use quotes around the whole command you typed. 

That is it!

 

If, like me, you need a refresher on the commands to use on CMD, here is a list:

1. If you want to enter a folder within the current folder you are in, type: cd [foldername]

2. If you need to view the contents of the directory you are in, type: dir

3. If you need to go one folder back from where you are currently, type: cd..

4. If you want to go to another drive, type: [Drivename]: e.g. F:

5. If you want to return to the root of the drive, type: cd\ 

6. To delete a file type: del filename.txt

BLOG COMMENTS POWERED BY DISQUS