Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

FL Studio Sample Purge

A Python utility designed to reclaim disk space by identifying and deleting WAV samples that are not being used in your FL Studio projects.

The Problem

As producers and developers, our sample libraries often grow to hundreds of gigabytes. Many of these samples are "stems" or datasets (like unmix stems) that contain identically named files (e.g., bass.wav, drums.wav) across different folders. Standard cleanup tools often fail to distinguish between them, or we simply don't know which folders are safe to delete.

The Solution

This script parses through all your .flp files (excluding backups) and uses Strict Path Matching to cross-reference your sample library. It tells you:

  1. Which specific files are safe to delete.
  2. Which folders are entirely unused.
  3. How much disk space you can reclaim.

Prerequisites

Python Version

Important: This script requires Python 3.10. Newer versions (3.11+) are currently incompatible with the underlying pyflp library due to an EventEnum error in the internal parser.

Dependencies

Install the required library via pip:

pip install pyflp

How to Use

  1. Clone the repo:

    git clone https://github.com/DirtyBeastAfterTheToad/fl-sample-purge.git
    cd fl-sample-purge
  2. Run the script: Pass the path to your projects and the path to your samples as arguments:

    python flp_scanner.py "C:/Path/To/Your/Projects" "D:/Path/To/Your/Samples"
  3. Review & Delete:

    • The script will first list all unused folders.
    • It will then list all unused files and the total reclaimable space.
    • You will be prompted: Do you want to delete the unused files? (Y/n).
    • Press Enter or Y to proceed. (Note: This deletes files only, it does not remove directory structures).

Safety Features

  • Git Aware: Automatically ignores .git and .github folders to protect your repositories.
  • Backup Exclusion: Skips .flp files found in "Backup" folders to avoid redundant matching.
  • Path-Tail Matching: Instead of matching just bass.wav, it matches folder_name/bass.wav to ensure it doesn't delete a sample from one pack just because you used a same-named sample from another.
  • Dry Run by Default: No files are deleted until you explicitly confirm at the end of the scan.

Why I Built This

My sample library reached a point where it was consuming massive amounts of SSD storage. Manual cleanup was impossible due to the sheer volume of nested directories and generic filenames. This tool helped me reclaim hundreds of megabytes (or gigabytes) by identifying the specific stems I never actually imported into a project.


Disclaimer: Always keep a backup of your important samples before running any deletion script. While this tool uses strict path matching, use it at your own risk.

About

No description or website provided.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages