Copy automatically contents of folder on a scheduled time

Hey Friends,
Today I am going to show you an interesting thing which is scheduled copy contents of a folder into other.
Basically, when your computer faces a problem which affects your operating system so that your computer does not start. Then you have to do only one thing is to apply a fresh window as an operating system then your previous data will be erased. Also, when you format your window intentionally but forgot to transfer your local files to another disk and when you do so your local (C drive) data will be destroyed. What about your important data if you don't want to lose them?

What if I tell you there is a method using which you can save your data. yes, you can save your local data files by copying the contents of a local dive's folder to another folder of D or E drive so that you never lose your data files.
Method (part I: how to copy contents of a folder into another)
follow the steps
1. open notepad
2. write xcopy followed by a blank space.
3. write the path of the source folder in double quote.
 e.g. "C:\xampp\htdocs"
4. write the path of the destination folder in double quote.
5. write /Y/H/E/F/I 
6. write exit and save the file as bat format.
copy contents of a folder into another
how to save the file


Now we have to create a schedule to be copied automatically for the folder
(part II: Creating a schedule)

1. Type "Task Scheduler" in the start menu and open it.
2. click on "create a task".


3. write the name of the task and press "ok".

4. Click on the action tab and then click on new on the bottom, then select start a program. Put the path of the bat file then press "ok".


5. At last, click on the  Triggers tab and click the new button. After that select "On a schedule" then set a time as you prefer and press "ok".



At set time you folder will automatically be copied.
Some used terminologies are given here:
/Y: Use it when you want to overwrite the contents of the source folder to the destination folder, otherwise don't use it.
/H: Use it when you don't want to copy the system files or hidden files of the source folder.
/E: Use it when you also want to copy the empty folder of the source folder.
/F: Use it when you want to display the full path and file name of both source and destination folder.
/I: Use this option to force xcopy to assume that destination is a directory. If you don't use this option, and you're copying from the source that is a directory or group of files and copying to the destination that doesn't exist,

please subscribe & share if it was helpful to you.







Comments

Post a Comment

Thank you!

Popular posts from this blog

How to add Internet download manager extension in the Chrome browser

A Day in Noida: Learning Begins

Python Deciding factor