Hello friends today we gonna learn about Automating Repetitive Tasks on Windows 10: Tips and Tutorial. So read this article, Automating Repetitive Tasks on Windows 10: Tips and Tutorial step by step so you may understand it in a better way. If you have query related to same article you may contact us. So Lets begin:
Guide: Automating Repetitive Tasks on Windows 10: Tips and Tutorial
Do you often find yourself deleting old files, cleaning unnecessary data, starting some programs manually, etc.? If so, let me help you automate and do more in less time. While these automations don’t save much time, but weigh the need for the time, any amount of time saved is worth trying.
I’ll start by introducing you to a few Windows tools that help us automate certain tasks, and then I’ll show you some examples of automating tasks on my Windows 10 PC.
Tools You Should Know
You may have heard of these tools: Command Prompt, PowerShell, and Task Scheduler. If not, don’t worry; in this section let me introduce you to these tools.back to menu ↑
Command prompt and batch files
Command Prompt, a successor to MS-DOS Prompt, is a command line utility. And a file with multiple commands is known as a “batch file”, which you can use to automate tasks, such as creating a backup.up of a file or folder on a portable drive. If you want to try, type ‘cmd“Or”Command Prompt“In Search bar of the Start menu, and you will find it.
You just have to compile the required commands in a text file with the extension “.bat” or “.cmd”. And you can easily open the file to run it; in this case, Windows 10 will run all commands from the file sequentially or as programmed in the batch file.
List of commands | How to useback to menu ↑
PowerShell and script files
PowerShell is one automation and management framework built for experienced users aka system administrators. If you are looking for real automation potential, you should learn about and use PowerShell.
I have to tell you that Command Prompt is much easier to learn and use than PowerShell because the latter provides much more power and features than the first.
You can access Windows PowerShell by typing its name in the Start menu search box. Note that you will see two programs – “PowerShell” and “PowerShell ISE”. PowerShell it is command line tool such as Command Prompt, while the other is used to write scripts (with the extension “.ps1”) that contain a group of commands, such as batch files.
List of commands | How to use | More informationback to menu ↑
Task planner and tasks
Another Windows tool that helps with automation is Task Scheduler – a program for planning programs and tasksScheduled tasks run at specific time intervals, can display messages or notifications to show when tasks are completed, and much more. Moreover, you can adjust the tasks to meet your requirements.
To open Task Scheduler in Windows 10, just type “scheduler” or “Task Scheduler” in Cortana’s search box, and you will find the scheduler program. Keep in mind that even Windows and various installed programs (like Google Chrome) create scheduled tasks to perform their own maintenance activities, so please Do not edit or disable other tasks
How to use | More informationback to menu ↑
Now that you know the required tools, let’s create some magical scripts and tasks. These scripts and tasks, when properly configured, can automate various maintenance tasks on your computer without needing you monitoring or intervening in these activities.back to menu ↑
Launch multiple apps
If you find it slow open multiple required files at every start, then you can automate it like I did. Just identify some folders, files and programs you want to start at the same time and create a batch file. You can also create a shortcut to this file and add a key combination to this shortcut to start it quickly with the shortcut keys.
For example, you can create a batch file to open some specific folders, Google Chrome browser, a Word file and an Excel file with the code below. Note that “% USERPROFILE%” below refers to the directory of your user profile in Windows.
@echo off :: Open folders start% USERPROFILE% Documents start% USERPROFILE% DesktopMusicFolder :: Open files start chrome.exestart “” “% USERPROFILE% DocumentsMy BlogsArticle1.docx” start “” “% USERPROFILE% DocumentsContent Ideas.xlsx” exitback to menu ↑
Launch apps as admin
You must have had success launching apps with the previous script, but running a program as an administrator doesn’t work the same way. It’s because the elevated program starts but asks for administrator access by displaying a UAC prompt. But if you are not there to give your approval to the prompt, the program will simply shut down, ie it will not start at all.
The same will not work with a shortcut also placed in the Windows startup folder. So, how to do it? The Task Scheduler program comes to our rescue for this problem. It alone features an option to run a program with elevated privilegesso you can start an app or a group of apps (using a batch script) with Task Scheduler. Here is how to do it:
- Open the Task scheduler Click “Create taskUnder Actions in the right pane.
- Below the General tab, add a job name such as “NoUAC1”, and check “Run with the highest privileges“Box.
- Click on the Trigger tab, under ‘Begin the task“, Select “In the initial phase
- Now switch to the Actions tab, click New
- In the New action window, front Action select ‘Start a program“, and under Program / script, Click Leaves button, choose the executable file you want to schedule and click OK
- Now go to the Settings tab ensure “Allow the task to run on demandIs checked and then click OK save.
- That’s all. Now the set program (Adobe Reader according to this tutorial) starts automatically with administrator rights when you start the system.
Delete all old files
As a tech enthusiast and developer, I usually download and test different things, and after a month or two, I see a lot of unnecessary files on my system. Fortunately, a batch script helps me to delete old downloaded files.
Likewise, you can use a batch file to convert delete all old files of specific extensions or files in a particular folder or subfolder that are older than the set date and time. Using the code below one can delete .docx files (change “docx” to match your files) in any specific folder older than twenty days (change the value of the “/ d” option to set any number of days).
@echo offforfiles / p “% USERPROFILE% DocumentsMy Blogs” / s / m * .docx / d -20 / c “cmd / c del @path” echo Deleted document files older than 20 days pausexit
And you can change the path (by changing the value of the “/ p” option) to the folder containing the files to be deleted. Below, “% USERPROFILE%” means your user’s directory.
back to menu ↑
Empty trash can
It is recommended that empty the trash regularly, and while it is an easy task, we will often forget it. Fortunately, this can be handled automatically using the Task Scheduler. Here are the steps to automatically optimize free hard drive space:
- Open the Task scheduler
- Open up Task Scheduler LibraryThen under the Action menu click on “New mapAnd call it “My Tasks”.
- Click on “My tasks“Folder and select”Create taskFrom the action menu.
- In the Create task window below it General type the task name as “Empty Windows Recycle Bin”.
- Click Triggers tab, click here New and under “Begin the task” Select “According to a schedule
- Choose the Weekly or Monthly option of your choice, as it gives you enough time to restore / undo files you need, and click OK
- Click Actions tab, go to New, and in New action window, bottom Settings in front of Program / script, type “PowerShell.exe”.
- In the same window, for “Add arguments (optional)“Type -NoProfile -Command” Clear-RecycleBin-Force “ and click OK button
- That’s it – just save the job and now the bin is cleaned on a scheduled basis.
Switch off the system
Since I couldn’t stop myself from working late at night, I decided to force myself to give up work and go to sleep. And that’s where the script below helped me.
The code below shows the message (you can edit it in the script) at 11pm and shuts down the system after 120 seconds (or 2 minutes). Note that you can even change the auto power off time in the code below by changing the corresponding value of “% time%”.
@echo off: aIf% time% == 23: 00: 00.00 go to: bgoto a :: bshutdown.exe / s / f / t 120 / c “Time To Say Good Night!” exit
Note: You will be given 120 seconds (edit “120” in the above script to change this duration) to save your work instead of the default 30 seconds. You can also stop the shutdown by pressing Win + R type shutdown -a hit Enter. It’s pretty easy, right?
back to menu ↑
Back-up files / folders
Well, I know we have pretty good support programs up our files, including cloud solutions such as Dropbox and Google’s Backupup and synchronization. However, if you want and want extreme control back upup of extremely sensitive files to your portable hard drive, a batch script is a neat, automated solution. And it is quite simple and does not need to be downloaded.
Keep in mind that this method is only ridges up specific files and folders and does not create a default system restore point or system backupup. I am using the “robocopy” command to create a backupup to create files in this script. Here is the code of the batch file to backupup to create the complete data in your user folder and also for the system registry:
@echo off :: Set the folder to backupup belowset sourcedir = C: UsersUSER :: Set the folder of your portable drive to belowset targetdir = D: Back-up if does not exist “% targetdir%” mkdir “% targetdir%” echo ### Backing up your profilerobocopy% sourcedir %% targetdir% * / e / y / r: 10 / vecho ### Backing up the registryÃ ¢ Â ?? Â¦if exists “% targetdir% regbackup.reg” del “% targetdir% regbackup.reg” regedit.exe / e “% targetdir% regbackup.reg” echo ### Back-up is all completed Â¦pause exit
back to menu ↑
Some closing remarks
I’ve always loved automating tasks and processes – that’s why I use IDEs more than regular text editors. I believe in productivity and if you do too, try the tools and sample scripts above, and light up your life a little more
I know this is not all you can achieve with these tools, but you can learn the above tools and try new ones tricks to automate more tasks. It’s easy to get started with this – just follow the links I’ve provided along with the tools in this article, and you’re good to go.
Hope you enjoy automating small tasks and also improve your productivity. And do not forget share your success story with me on @aksinghnet or using comments.back to menu ↑
Automating Repetitive Tasks on Windows 10: Tips and Tutorial: benefits
- The Automating Repetitive Tasks on Windows 10: Tips and Tutorial tutorial is free .
- This guide already helps so many users follow up with interest in a timely manner.
- The price of the Automating Repetitive Tasks on Windows 10: Tips and Tutorial guide is free.
Tutorial summary of Automating Repetitive Tasks on Windows 10: Tips and Tutorial
How this tutorial helping you?
What is actual time in which this method complete?
What are the supported Device?
back to menu ↑
I hope you like the guide Automating Repetitive Tasks on Windows 10: Tips and Tutorial. In case if you have any query regards this article you may ask us. Also, please share your love by sharing this article with your friends.
For our visitors: If you have any queries regards the Automating Repetitive Tasks on Windows 10: Tips and Tutorial, then please ask us through the comment section below or directly contact us.
Education: This guide or tutorial is just for educational purposes.
Misinformation: If you want to correct any misinformation about the guide “Automating Repetitive Tasks on Windows 10: Tips and Tutorial”, then kindly contact us.
Want to add an alternate method: If anyone wants to add more methods to the guide Automating Repetitive Tasks on Windows 10: Tips and Tutorial, then kindly contact us.
Our Contact: Kindly use our contact page regards any help. You may also use our social and accounts by following us on Whatsapp, Facebook, and Twitter for your questions. We always love to help you. We answer your questions within 24-48 hours (Weekend off).
Channel: If you want the latest software updates and discussion about any software in your pocket, then here is our Telegram channel.