TUTORIAL: How to Create Your Own Backup Program to Backup Your Files - Double click the program and it will do the rest of copying

in #tutorial6 years ago (edited)

Why buy an expensive backup program or app if you can create it on your own? Here's a few simple steps to create your own backup program.


This tutorial will utilize the ever reliable MS-DOS/CMD/Command Prompt based program called XCOPY that is "built-in" in every windows computer. We are going to make our own program to eliminate the daunting task of copy and pasting individual files and folders on your computer. After you have finished this tutorial you just have to double click it to run the program then the program will do the rest of copying. The program will automatically close itself after it has done copying.

This tutorial is compatible on all version of windows since the process is logically the same

IMPORTANT: Create a folder inside your drive D then name it destination if you don't have a drive D on your computer just create it in your drive C. We will use the "desktop" directory/folder in this tutorial because most of use love to put our files in our desktop.

NOTE: Don't worry about your multiple folders inside a folder the program will automatically create them for you.


So, without much further a do, let's start...

Step 1

Open Notepad, chose "File -> Save as"
1.png

Step 2

Type "sample.bat" in File name, choose "All files" in Save as type, then choose "UTF-8" in Encoding then click Save to save it to your desktop. Make sure you saved it to your desktop for easy access.
2.png

Step 3

After you clicked save, type the following in your sample.bat, pay attention carefully in this step...
3a.png
d: - means you are pointing your path to your computer's drive d.
cd\- means you are going to the root directory of your drive d.
cd desktop - means you are entering the desktop directory of your computer.
xcopy - the copy program utility the will initiate or do the copying.
*.* - means you are going to copy all the files in your desktop directory. If you only want to copy a specific file, for example a JPEG picture, use *.jpg instead. If you want to copy only excel files use *.xlsx .xlsx and .jpg are called extension name. If you are unsure about the extension name of a file just use *.*, still if you want to be specific you can ask your friend Google.
/y - will suppress prompting to confirm you want to overwrite an existing destination file.
/s - will copy directories and subdirectories except empty ones.
/c - will continue copying even if errors occur.
d:\destination means your files will be copied to the folder named "destination" inside your drive d. If you don't have a drive d and created your destination folder in drive c, just change it to c:\destination
exit means the program will automatically close itself after the copying is done.

NOTE: I have relocated my desktop directory in my drive D that's why I used the command "d:" to access my computer's desktop. If you did not relocate your desktop directory type the following command below instead

3b.png
Just change jhon with you own windows username

Step 4

Save the changes you made in your sample.bat go to "File - Save''
4.png

That's it, it's done. Go to your desktop and find the file "sample" and double click it to start your backup. It should look like the screenshot below. If you see a message asking you to press D for directory and F for files, choose or press D on your keyboard.
5.png

You should see something like this now while it is copying files
6.png

Enjoy guys. A thank you is very much appreciated.

Why buy an expensive backup program or app if you can create it on your own? Here's a few simple steps to create your own backup program.


This tutorial will utilize the ever reliable MS-DOS/CMD/Command Prompt based program called XCOPY that is "built-in" in every windows computer. We are going to make our own program to eliminate the daunting task of copy and pasting individual files and folders on your computer. After you have finished this tutorial you just have to double click it to run the program then the program will do the rest of copying. The program will automatically close itself after it has done copying.

IMPORTANT: Create a folder inside your drive D then name it destination if you don't have a drive D on your computer just create it in your drive C. We will use the "desktop" directory/folder in this tutorial because most of use love to put our files in our desktop.

NOTE: Don't worry about your multiple folders inside a folder the program will automatically create them for you.


So, without much further a do, let's start...

Step 1

Open Notepad, chose "File -> Save as"
1.png

Step 2

Type "sample.bat" in File name, choose "All files" in Save as type, then choose "UTF-8" in Encoding then click Save to save it to your desktop. Make sure you saved it to your desktop for easy access.
2.png

Step 3

After you clicked save, type the following in your sample.bat, pay attention carefully in this step...
3a.png
d: - means you are pointing your path to your computer's drive d.
cd\- means you are going to the root directory of your drive d.
cd desktop - means you are entering the desktop directory of your computer.
xcopy - the copy program utility the will initiate or do the copying.
*.* - means you are going to copy all the files in your desktop directory. If you only want to copy a specific file, for example a JPEG picture, use *.jpg instead. If you want to copy only excel files use *.xlsx .xlsx and .jpg are called extension name. If you are unsure about the extension name of a file just use *.*, still if you want to be specific you can ask your friend Google.
/y - will suppress prompting to confirm you want to overwrite an existing destination file.
/s - will copy directories and subdirectories except empty ones.
/c - will continue copying even if errors occur.
d:\destination means your files will be copied to the folder named "destination" inside your drive d. If you don't have a drive d and created your destination folder in drive c, just change it to c:\destination
exit means the program will automatically close itself after the copying is done.

NOTE: I have relocated my desktop directory in my drive D that's why I used the command "d:" to access my computer's desktop. If you did not relocate your desktop directory type the following command below instead

3b.png
Just change jhon with you own windows username

Step 4

Save the changes you made in your sample.bat go to "File - Save''
4.png

That's it, it's done. Go to your desktop and find the file "sample" and double click it to start your backup. It should look like the screenshot below. If you see a message asking you to press D for directory and F for files, choose or press D on your keyboard.
5.png

You should see something like this now while it is copying files
6.png

Enjoy guys. A thank you is very much appreciated.

Coin Marketplace

STEEM 0.28
TRX 0.11
JST 0.031
BTC 69104.81
ETH 3758.34
USDT 1.00
SBD 3.68