Say you have some configuration files that you would like to mirror and backup, you can write a batch file to automatically copy files using the xcopy command:
xcopy /y "c:\[SOURCE]" "c:\[DESTINATION]"
Use the Task Scheduler to automate running your batch file, and you’re all set!
Sometimes you need to backup certain collections of files or folders separately from a full backup. These are usually small configuration files that you either might not normally backup as part of a routine schedule or ones you might edit more often and need to have more frequent backups. Doing this in Windows is fairly easy by writing a batch file to execute the command-line version of 7-Zip and saving the result to a cloud-synced folder.
First, download the command-line version of 7-Zip from their website.
Extract the zip file to a folder somewhere accessible on your hard drive.
Right-click and create a new text document. This is the file we will use to create our batch commander. In Notepad, type the following command (subbing in file locations where indicated):
C:\[PATH TO 7ZIP]\7za a -y -tzip "C:\[OUTPUT PATH].zip" "C:\[INPUT PATH]" -mx5
To automatically zip all the contents of a folder, add an asterisk to the end of the input path as a wild card.
Save the document as a *.bat file (be sure to have “All File Types” selected) in a place where you can easily find it.
To run your new batch file automatically, create a new task in Windows Task Scheduler running your batch file as a program on whatever schedule you like.
Windows 7 brought some badly-needed security features to Microsoft’s flagship operating system, but with this new power came one minor setback: the ability to autorun programs with elevated privileges on startup. Instead of adjusting our overall security settings to not bother us requesting elevated privileges (a bad idea), we’re going to use the Task Scheduler tool to automate these tasks.
Locate the Task Scheduler by typing its name in the search box on the Start Menu. In the “Action” menu, click “Create Task…” (NOT “Create Basic Task…”)
In the “Create Task” window, give the task a name. For example, let’s use EventGhost. Make sure to select “Run only when user is logged on” and “Run with highest privileges” and to choose your correct version of Windows from the “Configure for” dropdown.
In the “Triggers” tab, click the “New…” button. Chose to begin the task “At log on” and select for “Any user”. Make sure no other options are checked besides “Enabled” and click OK.
In the “Actions” tab, click “New…” and make sure that “Start a program” is selected from the dropdown menu. Browse for your application executable (EventGhost.exe), add any arguments (if applicable), then click “OK”.
In the “Conditions” tab, nothing should be checked (unless you have a very specific case). Finally, in the “Settings” tab, check the options as they are in the screenshot below and click “OK”.
Your application should now execute automatically when you reboot!