Speed Up Your Computer with a Professional Cleaning!

Tuesday, October 13, 2020

How to Easily Write Your Own Windows PC Backup Program by Computer Tutor...





Video - How to Easily Write Your Own Windows PC Backup Program by Computer Tutor and Programmer J. Richard Kirkham B.Sc.

When I asked for topics on which to do a computer video tutorial I was impressed when I received three requests for how to write a backup program for Windows computers to external hard drives. As the computer repair guy covering Honolulu Hawaii and all of Oahu who gets called to recover files from computers that won’t start, my faith in computer users being more proactive is now restored.

  Mobile viewers click to Text 808.224.1870 In home, onsite and low cost remote computer, tablet and smart cell phone tutor, trainer, mobile virus removal and repair specialist,
Experienced, dual certified teacher J. Richard Kirkham B.Sc. of Honolulu Hawaii covering all of Oahu.
Call or Text 808.224.1870
BEFORE your computer breaks down
To speed up your slow computer and
For help with Windows PCs, Surface tablets or Apple/Mac computers.
Do It Yourselfers download Mr. Kirkham's Ebook

| Safe Computer Backups | | Save Hundreds of Dollars on Computer Repairs With This Lisit of Do It Yourself Software and Ebooks | | Senior Specialty In Home Computer Lessons and Computer Setup Oahu | | Local SEO Service Oahu Get Found Online! | | Find or Post Your Hawaii Jobs | | Make Money Online Passively With This Startup Program I Wrote for Beginners! | | My Personal Choice for Website Hosting |


What I’ll Show You

I’ll show you how to write a simple script called a batch file or batch script. It uses all native (built in) features in Windows 10. In fact 99% of these features have been around since I was writing in a command line in DOS to run software. This is definitely a case where the old becomes the new.

Let’s Do a Little Security and Ease of Use Preparation First

On your computer hold down the Windows key on the keyboard on the lower left hand side and tap the r key.

A runbox will appear

Now type in the word control and press enter

Your control panel probably reads view by Category in the upper right hand corner

Click on category and select large icons

Click on File Explorer Options

Click the view tab at the top

Uncheck Hide extensions for known file types

Rick, Why Did I Just Uncheck That?

Now you’ll be able to see the endings (file types) of each one of your files. I had a case of defeating a computer encryption virus partially by doing that so I could see which files types actually belonged and which were encrypted files after I did a recovery.

CAUTION: If you rename a file you must keep the .ending the same or the computer won’t know which software to use to open the file.

This method will also make it easier to make the .bat ending Windows will be looking for to execute your backup program.

Okay Rick, What Do I Need to Write This Easy to Write Backup Program?

An external hard drive. You’re actually better off with an external SSD which stands for Solid State Drive. Solid State Drives will last longer and are much less likely to crash on you. Be aware some links in the article are affiliate links to Amazon and will pay me for my efforts. Thank you for your support.

You could use a flash drive. 64gb (gigabyte) flash drives are pretty cheap nowadays. Make sure it’s at least usb 2 compatible or you’ll wait forever for your backup to finish.

Windows PC. This will not work on any other operating system including my favorite, Linux. Quick tip for businesses running Windows computers. Make sure your computer has a minimum of 8gb of RAM for optimal speed and to reduce load time and buffering. I clean and optimize A LOT of computers both on Oahu and remotely throughout the U.S.A. and there's a huge difference between 4gb of RAM and 8gb of RAM even after I’m done.

Okay Let’s Write Your Backup Program for Your Windows Computer

We’ll write this right on your external SSD (or flash drive) so plug that into your computer now.

Go into the root directory of your external SSD. If you don’t know how to get into that click on file explorer. The little yellow folder you see often found on your taskbar at the bottom of your screen. Search the column on the left for a drive letter other than C. Sometimes it will have the name of the manufacturer as well as the drive letter. Click on that drive letter. You’re in!

I always tell my in home computer tutoring students on Oahu and remotely on the mainland U.S.A. right mouse click for a menu left mouse click for an action.

Right mouse click in File Explorer anywhere in a white area in the right hand column.

Scroll down to New do not click it you’ll get a submenu.

Bring your mouse cursor to Text Document and left click on it

Because of the previous work we did New Text Document.txt will appear. Otherwise the .txt would not have appeared making this a bit harder to do.

It’s already highlighted in blue so no need to click inside it.

Type in mybackup and rename .txt .bat so you now have mybackup.bat

Press enter on your keyboard or click anywhere in the white area of File Explorer

After Completing The Steps Above Type These Command Line Codes

Right mouse click on mybackup.bat and left mouse click edit

A notepad will appear.

Optional to clean up a little.

Copy and paste this

@attrib -h -s "..\%username%"

@del %TEMP%\*.* /f /s /q

@del /s /f /q C:\Windows\Temp\*.*

@del /s /f /q %USERPROFILE%\appdata\local\temp\*.*

Here’s What You Do Need to Type in or Copy To Backup Your Files

xcopy "%userprofile%\*.*" "\%username%\" /d /s /c /f /h /r /y /e

@attrib -h -s "..\%username%"

Pause

Thanks Rick, What Do These Computer Backup Command Lines Mean?

Xcopy has been around as long as I can remember. I got into computers in 1993. It’s a command to copy files. Xcopy has different switches signified by a / forward slash.

%userprofile% is the path to the profile where your computers are stored. C:\Users\InHomeComputerHelp for example if InHomeComputerHelp was your username. The quotation marks in the line of code take care of spaces

C:\Users\In Home Computer Help for example wouldn’t work without being between “ ”.

%username% is your actual username without the path. So what your computer backup program does is it creates a directory on your external SSD with your username and copies all your files from your user profile into that folder (same thing as directory). Thus if you have multiple user profiles, say you and your wife or you and your business partner, you can both use the same external SSD for the backup and the files will remain separate!

@attrib -h -s "..\%username%" is just basically unhiding any files that might get the hidden attribute during your backup. It probably won’t happen. It’s a whatif thing.

Pause just keeps the black DOS box from closing so you can see if everything copied or if it stopped. YOU WILL see errors in copying as some files cannot be copied even though xcopy will attempt to do so. If your backup program stops right away there is a problem. Easiest way to fix it and yes I know it’s self-serving is to hire me to fix it for you remotely. You’ll spend half your day trying to find the problem and I’ll fix it in minutes.

Rick That Backup Took a Long Time. Will It Always Take That Long?

NO! That’s why we have these switches in your code /d/y

The /d tells xcopy to only copy files that have been updated or are new files.

The /y gives permission to overwrite to update the file without having to tap your y key 1000 times.

Safety Tips

DO NOT keep your external SSD plugged in all the time. That makes it susceptible to a computer virus attack. ONLY plug it in to do your backup, then put it in a safe place. Preferably a fireproof safe.

A managed offsite backup and weekly system image is the best way to go to protect your clients’ data and your own. Sign up here for your FREE trial of Dr. Backup. Yes I get paid if you sign up through this link. I’ve spoken to Mitch, the owner of the company, and the guy knows his stuff.

I’ve Already Written This Computer Backup Program!

I’m charging a whopping $9.95 for the downloadable flash drive version of the program. That makes a single backup and continues to update it. There’s also an external SSD version which makes multiple copies based on the days of the week. Check it out!


Contact Me, Rick Kirkham for Your Computer Tutoring Troubleshooting Optimization and Repair Needs

Honolulu Hawaii and all of Oahu Call or Text 224.1870. Mainland USA text only for remote computer tutoring, optimization and repair due to time differences Text 808.224.1870.

ComputerHelp808@gmail.com

No comments:

Post a Comment