How to Delete a Song in Media Player Classic While It's Playing

Media Player Classic (MPC) is a lightweight, no-frills video and audio player that's been a staple on Windows systems for decades. Its stripped-down design is a feature, not a bug — but that minimalism can create friction in specific situations, like trying to delete a file that's currently loaded and playing.

Here's the practical reality: Windows locks files that are actively in use by a process. When MPC is playing a song, it holds an open file handle on that audio file. That means right-clicking and hitting Delete won't work — Windows will throw an error telling you the file is in use and can't be removed.

Understanding why this happens is the first step to working around it.

Why Windows Locks Files During Playback

When any media player — including MPC — opens a file, the operating system creates a file handle that grants the process exclusive or shared access to that file's data on disk. As long as that handle is open, Windows treats the file as "in use" and prevents deletion to avoid corrupting the read stream or causing the application to crash mid-playback.

This isn't unique to MPC. It applies to VLC, Windows Media Player, and virtually every native Windows application that reads from disk. The distinction with MPC is that it offers fewer built-in workarounds compared to something like VLC, which has more playlist and file management features baked in.

Method 1: Stop Playback First, Then Delete 🎵

The most straightforward approach:

  1. Stop the track entirely in MPC (not just pause — use the Stop button or press the S key)
  2. Close the file via File → Close, or simply close MPC
  3. Navigate to the file in Windows Explorer
  4. Delete it normally

Stopping playback doesn't always release the file handle immediately in every version of MPC. If you still get a "file in use" error after stopping, closing MPC entirely will release all handles it holds.

Method 2: Use the Playlist to Skip, Then Delete

If you're managing a queue of songs and don't want to shut MPC down:

  1. Advance to the next track in the playlist so MPC loads a different file
  2. Once MPC has moved on, the handle on the previous song is typically released
  3. Navigate to that file and delete it

This works because MPC generally releases the file handle when it stops actively reading from a file and moves to another. However, this behavior can vary depending on which version of MPC you're running — Media Player Classic Home Cinema (MPC-HC) and the older MPC-BE (Black Edition) handle file access slightly differently.

Method 3: Force-Release the Handle with a Tool

For cases where stopping or closing MPC doesn't release the lock, a utility like Sysinternals Process Explorer or Handle (both from Microsoft) lets you:

  1. Identify which process holds the file handle
  2. Forcibly close that handle
  3. Delete the file without rebooting or closing MPC

This is a more advanced approach. Forcibly closing a handle while a process is running can cause MPC to crash or behave unexpectedly, so it's best used when you're comfortable with that trade-off.

Another commonly used tool for this purpose is LockHunter or Unlocker, which provide a graphical interface for identifying and releasing locked files.

Method 4: Schedule Deletion on Next Reboot

If the file absolutely won't release and you don't want to use a third-party tool, Windows has a built-in mechanism — MoveFileEx with the MOVEFILE_DELAY_UNTIL_REBOOT flag — that marks a file for deletion on the next system restart. You can trigger this via the command line or through tools like MoveFile from Sysinternals.

This isn't instant, but it's clean and doesn't require force-closing anything.

Key Variables That Affect Which Method Works

VariableWhy It Matters
MPC version (MPC-HC vs MPC-BE)Different builds handle file locking behavior slightly differently
File type (MP3, FLAC, WAV, etc.)Some formats require continuous file access; others are buffered fully into memory
Windows versionFile locking enforcement has evolved across Windows 10 and Windows 11
Antivirus softwareSome AV tools add their own file handles during playback scans
SSD vs HDDDoesn't affect locking, but affects how quickly file deletion completes once unlocked

The Buffering Factor

One underappreciated variable: whether MPC has buffered the entire file into memory before deletion. For very short audio files, MPC may load the whole file into RAM on open, after which the on-disk file is no longer actively read. In theory, this could allow deletion mid-playback — but this behavior is inconsistent and not something you can rely on across different machines or configurations.

Don't count on it working. The safer assumption is always that the file is locked until MPC fully releases it.

Different User Profiles, Different Friction Points 🗂️

A user running MPC-HC on Windows 11 with a simple playlist of MP3s will likely find that stopping playback and deleting works without any issues. A user running an older build of MPC-BE on Windows 10 with FLAC files may find that the file handle lingers even after stopping, requiring a full application close or a tool-based unlock.

Someone managing a large music library who regularly curates files during listening sessions will hit this limitation often enough that it's worth evaluating whether MPC's file management model fits that workflow — or whether a player with more robust in-playlist file operations is worth exploring.

The right path depends on how often you need to delete files mid-session, which version of MPC you're running, and how comfortable you are with tools that operate at the file system level.