home / skills / openclaw / skills / file-organizer

file-organizer skill

/skills/lkz4203/file-organizer

This skill automatically organizes files in a directory by moving them into subfolders based on extensions to keep folders tidy.

npx playbooks add skill openclaw/skills --skill file-organizer

Review the files below or copy the command above to add this skill to your agents.

Files (2)
SKILL.md
400 B
---
name: file_organizer
description: Automatically organize files in a specified directory by moving them into subfolders based on their file extensions. Use for cleaning up messy folders like Downloads or Desktop.
---

# File Organizer

Keep your directories tidy.

## Usage
Run `scripts/organize.ps1` with the target path.
Example: `powershell.exe -File scripts/organize.ps1 C:\Users\L\Downloads`

Overview

This skill automatically organizes files in a specified directory by moving them into subfolders based on file extensions. It is designed to quickly tidy messy folders like Downloads or Desktop and reduce manual file sorting. The implementation uses a simple script flow that is easy to run and adapt to your environment.

How this skill works

The script scans the target directory and groups files by extension. For each extension it creates a corresponding subfolder (for example, "pdf" or "jpg") and moves matching files into those folders. It skips directories and can be run on demand to re-organize a folder without altering file contents.

When to use it

  • Clean up a cluttered Downloads or Desktop folder quickly.
  • Prepare folders before backing up or archiving user data.
  • Standardize file placement for easier search and automation.
  • Routine maintenance to keep shared folders tidy.
  • Before migrating files to another system or cloud sync.

Best practices

  • Run the organizer on a copy or test folder first to confirm behavior.
  • Exclude any folders you want to keep intact by running against a specific path.
  • Schedule periodic runs (daily or weekly) to maintain a tidy workspace.
  • Ensure applications using files are closed to avoid locked-file errors.
  • Review moved files after a run to catch any unexpected grouping.

Example use cases

  • One-off cleanup of a Downloads folder that has accumulated installers, images, and documents.
  • Automate pre-backup organization so backups store files in predictable subfolders.
  • Organize files before uploading to a shared drive to make permissions and discovery easier.
  • Sort files on a shared Desktop on multi-user machines to reduce clutter.
  • Prepare a folder for archival by grouping similar file types together.

FAQ

Which platforms does this script run on?

The provided script is a PowerShell script intended for Windows, but the organizing logic can be adapted to other platforms with a shell or Python implementation.

Will the script overwrite existing files?

The script moves files into extension-based folders and should avoid overwriting by preserving filenames; test on a sample folder to confirm behavior for duplicate names.