View all Worklets
Windows

Folder Clean Up

Folder clean up: Purges targeted files within or outside profiles.

Worklet Details

Introduction to the PowerShell Based Folder Clean Up Worklet

The Folder clean up Worklet is a Windows PowerShell script designed to help users efficiently clean up their system files by deleting specified folders and contents within them. This Worklet can be particularly useful for those looking to free up disk space and improve system performance.

By automating the cleanup process, users can save time and effort that would have otherwise been spent on manual deletion of temporary files and folders.

Why would you use the Folder Clean Up Worklet?

One major advantage of using the Folder clean up Worklet is the ability it provides to maintain a clutter-free and organized system. Accumulation of temporary files, cache data, logs, and other unused content can slow down your computer's performance over time. Regularly cleaning these folders can not only free up valuable disk space but also enhance the overall efficiency of your system by reducing unnecessary resource consumption.

Components of the Folder Clean Up Worklet

The Worklet comprises configurable variables that allow users to customize the folder cleanup process according to their preferences.

These variables include $forceDelete, $deleteEmpty, $targetFolders, $userFolders, and $exclude. Users can choose whether or not they want to delete entire folders and contents ($forceDelete), remove empty subfolders after file deletions ($deleteEmpty), specify non-user specific locations ($targetFolders), provide user-specific folder paths ($userFolders), or exclude certain file types from deletion ($exclude).

How does the Folder Clean Up Worklet work?

Once configured as per user requirements, the Worklet uses Windows PowerShell commands to iteratively go through each specified folder location. It checks for existing directories, evaluates their contents based on predefined parameters (including force deletion mode or exclusion rules), and proceeds with the deletion process accordingly.

The script also supports tail recursion for efficient removal of empty subfolders if required by user settings.

What is the expected outcome when you use the Folder clean up Worklet?

When properly configured and executed, the Folder clean up Worklet aims to provide a cleaner and more organized system by deleting targeted files and folders that are no longer needed. This can result in improved system performance, faster response times, and increased disk space availability for users.

This Worklet ensures a consistent method to maintain your computer's health while minimizing manual intervention.

View in app

Consider Worklets your easy button

What's a Worklet?

A Worklet is an automation script, written in Bash or PowerShell, designed for seamless execution on endpoints – at scale – within the Automox platform. Worklet automation scripts perform configuration, remediation, and the installation or removal of applications and settings across Windows, macOS, and Linux.

do more with worklets