How to Automatically Clean Your Desktop with Power Automate

I tend to download stuff and work on my default desk. So, like most people, my office (and even the download folder) is almost always a waste with icons, files and random folders everywhere. So I configured an automation system which automatically erases this size by sorting and organizing my files every hour.
Get food automation
You need a single application for this, and it is integrated into Windows 11. It is called Power Automate. If you run Windows 10, you can install from the Microsoft Store.
If you are new in automation, and the idea of automating desktop cleaning evokes images of complicated code or bash scripts, don’t worry. You don’t need to perform code or learn something complicated to work. Powerautomate makes it quite simple, and once you can configure this flow of declining automation, you can learn to do yours too.
Let us first familiarize with Power PLC. Open the Start menu and search Automate food and launch the application. During the first launch, the application will welcome you with a welcome visit, which you can jump if you wish. You are now on the dashboard.
Power Automate is built on two things: flows and actions. Flows are a lot of repressed actions that perform an automated task. And the publisher Power Automate gives you access to a ton of actions and allows you to chain them in a very specific way in the loops or the conditions to get things done.
We will jump there and understand what it means in action. Let’s create a new flow.
Step 1: Create a new flow
Click on “New flow” at the top, or go to the Flux tab and click “New flow”. Give a name to the flow, then click Create. Once created, it will open in the publisher Power Automate. The publisher has an action component and a tab for the main flow and a tab for sub-flux.
Step 2: Observer of the file
We are going to create a routine that looks at the office (which is only another file of your reader) or your download folder for the changes. The action for this is called “Get files in the folder”, which enters files in the target folder, then allows you to decide what to do with it.
In the actions component, search Get files in the folder and double-click on. It will open a window where you can choose the folder you get the files. Click on the folder, then click the blue folder icon to choose your desktop location.
You will notice that the first action is now in the main flow, which stored its output in the “files” variable. File recovery is the first step. The next step is to relaunch files to their relevant folders. Let’s do this now.
Step 3: Send files to the right destination
We will configure a loop that automatically identifies a file by its extension to the desktop and send it to a predefined folder.
The loop here is called for everyone. Look for “for everyone” in the actions component and double-click on. He will ask you what value you want. The Blue X next door allows you to choose the variable you want to make a loop. In our case, our variable is “files” from the previous step. It records the current file on which the loop operates as “currentity”.
In simple terms, Power Automate looks at each file on the desktop, and for each file, it connects it in the logic of loop any anything we attribute to it.
Let’s make this logic of loop.
Again, go to the actions component and this time search “IF” which raises the conditional SI. Double-click on “If” and next to the first opend, click on the Blue X icon and choose “Currentitem”.
Now we mean Power Automate to watch all the files on the desktop and choose the right ones. We can do so by telling him to note the extension. For example, an image file will have the .jpg, .jpeg, .png or .webp extension at the end. So, for the operator, we choose “ends with”.
Finally, we specify the second opendet, which is the file extension in our case. I will choose .jpg.
What happens when Power Automate finds a JPG file on the desktop? We will configure this afterwards. Action is a travel file. This part is simple. If a file name ending with .jpg is found, move the file to the following destination.
In the actions component, research Move the file and double-click on. The action of Move files requires two things: he wants to know which files you want to move and where you want to move them. The file name will be stored in the “Currentitem” variable that we have already configured. And we can move it to any folder we love.
You have it. Our first automated power flow, which scans all the files on the desktop, search for JPG files and automatically moves them in the photo folder.
You can test it by selecting the very first action and clicking on the reading button. You will see Power PLO execute the flow in real time and move all your files in a few seconds.
Step 4: Add more file types
The next part is easy. We can now copy and paste the IF-THEN action in the same for each loop and replace .JPG with other file extensions as well as the destination of displaced files.
Select the three blocks: if, move the files and finish, and right -click and choose Copy. Then select the latest end tag and click on glue. This ensures that the copied block is stuck in the main loop.
Then you simply change the extension and destination in the IF blocks and move as needed. You can always change the flow later to add more files and destinations. For example, if you try to automatically send screenshots to the desktop in a dedicated screenshot folder, you can modify the conditional IS to search for the word “screenshot” in the file name, then send it to a specified directory.
The same goes for file types. In this flow, I have configured PDF files to be reassigned to the Documents folder. You can configure similar automation for the documents with which you generally work. I would go for .md, .odt, .txt, .doc and .docx to cover the bases. Software files like .exe or .MSI could go to an apps folder.
Finally, save the flow by clicking on the save icon at the top.
Step 5: Configure a keyboard shortcut
At this point, you can launch Power PLO at any time and click on the reading button to unclog your office in one. If you want to go further, you can configure a keyboard shortcut to execute this automation in the background.
Access the FLUX tab and select your declining flow. Click on the three -point properties and then.
You will see a labeled field “execute with a keyboard shortcut”. Click on it and press a key combination like CTRL + SHIFT + BackSpace to trigger the flow.
With this, you can now magic your desktop or download, no matter how much the shortcut. Power Automate can do much more than simple file sorting, and if you are interested, you can consult more flows.



