PHPackages                             terremoth/php-win32-filepicker - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [File &amp; Storage](/categories/file-storage)
4. /
5. terremoth/php-win32-filepicker

ActiveLibrary[File &amp; Storage](/categories/file-storage)

terremoth/php-win32-filepicker
==============================

Use native Windows Explorer File Selector to select a file on PHP

v1.0.2(1y ago)14[1 issues](https://github.com/terremoth/php-win32-filepicker/issues)GPL-3.0-or-laterPHPPHP ^8.1CI passing

Since Mar 6Pushed 1y ago1 watchersCompare

[ Source](https://github.com/terremoth/php-win32-filepicker)[ Packagist](https://packagist.org/packages/terremoth/php-win32-filepicker)[ RSS](/packages/terremoth-php-win32-filepicker/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (5)Versions (4)Used By (0)

PHP Win32 File Picker
=====================

[](#php-win32-file-picker)

Calls Windows Explorer to select file(s).

You are able to configure to select 1 or multiple files, filtering by extensions or let the user free to choose any.

Unlocked by the power of PHP's [FFI](https://www.php.net/manual/en/book.ffi.php)

*Not because we must do it, but because we can!*

Made by [Terremoth](https://github.com/terremoth/) with ⚡ &amp; ❤

[![Test Run Status](https://github.com/terremoth/php-win32-filepicker/actions/workflows/workflow.yml/badge.svg?branch=main)](https://github.com/terremoth/php-win32-filepicker/actions/workflows/workflow.yml)[![License](https://camo.githubusercontent.com/a65eb4b56cc4efe407af4a120f9e522d246101b19c33cf9379a58cd71e0677e9/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f74657272656d6f74682f7068702d77696e33322d66696c657069636b65722e7376673f6c6f676f3d67706c26636f6c6f723d343162623133)](https://github.com/terremoth/php-win32-filepicker/blob/main/LICENSE)[![Latest Stable Version](https://camo.githubusercontent.com/ee86b028ad4ad386fa8dc0576c0126650bf021278c9f8b59c627e39688ce2e79/68747470733a2f2f706f7365722e707567782e6f72672f74657272656d6f74682f7068702d77696e33322d66696c657069636b65722f762f737461626c65)](https://packagist.org/packages/terremoth/php-win32-filepicker)[![Total Downloads](https://camo.githubusercontent.com/a677686bfcbae1409b3af24ffe1f41998f5be0da00a724097c3e9a2e70a5be5b/68747470733a2f2f706f7365722e707567782e6f72672f74657272656d6f74682f7068702d77696e33322d66696c657069636b65722f646f776e6c6f616473)](https://packagist.org/packages/terremoth/php-win32-filepicker)[![Dynamic JSON Badge](https://camo.githubusercontent.com/eb4213f17d0377c12d16de72a061b9700a74123e48a50ab9975e45685be6ce14/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f64796e616d69632f6a736f6e3f75726c3d6874747073253341253246253246646973636f72642e636f6d253246617069253246696e76697465732532464a7846684d5657753832253346776974685f636f756e7473253344747275652671756572793d2532342e617070726f78696d6174655f6d656d6265725f636f756e74266c6f676f3d646973636f7264266c6f676f436f6c6f723d7768697465266c6162656c3d5573657273253230546f74616c26636f6c6f723d677265656e)](https://discord.gg/JxFhMVWu82)[![OpenSSF Scorecard](https://camo.githubusercontent.com/56b039c48a01c838f5aed1af8b29a8f10999c694ef7e4c1471a48306619a478c/68747470733a2f2f6170692e73636f7265636172642e6465762f70726f6a656374732f6769746875622e636f6d2f74657272656d6f74682f7068702d77696e33322d66696c657069636b65722f6261646765)](https://scorecard.dev/viewer/?uri=github.com/terremoth/php-win32-filepicker)

[![codecov](https://camo.githubusercontent.com/34591408ef1184da1a986ac8527bdf1f4c342bb6bc5e5fe3fb4a11a1daa1ddb4/68747470733a2f2f636f6465636f762e696f2f67682f74657272656d6f74682f7068702d77696e33322d66696c657069636b65722f67726170682f62616467652e7376673f746f6b656e3d4f4b313942304e363537)](https://codecov.io/gh/terremoth/php-win32-filepicker)[![Test Coverage](https://camo.githubusercontent.com/f306596d1acea9748a297fe66801debec6c108ea1b1101764dd92c52a3bf9606/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f31656335633264613063356133363663656362372f746573745f636f766572616765)](https://codeclimate.com/github/terremoth/php-win32-filepicker/test_coverage)[![Psalm type coverage](https://camo.githubusercontent.com/28c45c9f3fcb8d449c462852574c7cc96589221dbd16ff913af1c66660c59ea6/68747470733a2f2f73686570686572642e6465762f6769746875622f74657272656d6f74682f7068702d77696e33322d66696c657069636b65722f636f7665726167652e737667)](https://shepherd.dev/github/terremoth/php-win32-filepicker)[![Psalm level](https://camo.githubusercontent.com/bd7f2a1481cb6d26a9b5d25cec9f5b38bda9ec1537999d61edf97b50fa89aa83/68747470733a2f2f73686570686572642e6465762f6769746875622f74657272656d6f74682f7068702d77696e33322d66696c657069636b65722f6c6576656c2e737667)](https://shepherd.dev/github/terremoth/php-win32-filepicker)[![Codacy Badge](https://camo.githubusercontent.com/1f0d4519456949dd8ba5991af1eb12b07abc3c090746cf8bdd9f03c03d824894/68747470733a2f2f6170702e636f646163792e636f6d2f70726f6a6563742f62616467652f47726164652f6630623138366562313261373435613739623131306664653632356236343566)](https://app.codacy.com/gh/terremoth/php-win32-filepicker/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)[![Maintainability](https://camo.githubusercontent.com/1aac6cfa356d90641101a9debab7d15463fefd13271564698520d836e64861dd/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f31656335633264613063356133363663656362372f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/terremoth/php-win32-filepicker/maintainability)

Installation
------------

[](#installation)

```
composer require terremoth/php-win32-filepicker
```

Documentation
-------------

[](#documentation)

```
require_once 'vendor/autoload.php';

use Terremoth\Win32\FilePicker;

$selectedDirectory = $_SERVER['USERPROFILE'] ?? 'C:\\'; // optional

$fp = new FilePicker($selectedDirectory); // $selectedDirectory can be null without problem.

// all methods below are *optional*:
$fp
    ->selectMultipleFiles()
    ->addExtensionsFilter(['png', 'jpg', 'gif', 'avif', 'webp', 'jpeg', 'ico', 'bmp'])
    ->filterOnlySelectedExtensions()
    ->setDefaultExtensionSearch('png')
;

$selectedFiles = $fp->open();

print_r($selectedFiles);

// if no files were selected, an empty array will be returned 😉
```

That's it!

See [demos/demo.php](demos/demo.php) for this example.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance24

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

3

Last Release

439d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c78ff7b98290627988e65a7dd9d079fb6fe2f4386e901345d4d1eb24138bf6ff?d=identicon)[terremoth](/maintainers/terremoth)

---

Top Contributors

[![terremoth](https://avatars.githubusercontent.com/u/11032344?v=4)](https://github.com/terremoth "terremoth (16 commits)")

---

Tags

nativefilepickerwin32php-ffiwin32apifile-picker

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/terremoth-php-win32-filepicker/health.svg)

```
[![Health](https://phpackages.com/badges/terremoth-php-win32-filepicker/health.svg)](https://phpackages.com/packages/terremoth-php-win32-filepicker)
```

###  Alternatives

[knplabs/gaufrette

PHP library that provides a filesystem abstraction layer

2.5k39.8M123](/packages/knplabs-gaufrette)[superbalist/flysystem-google-storage

Flysystem adapter for Google Cloud Storage

26320.6M30](/packages/superbalist-flysystem-google-storage)[illuminate/filesystem

The Illuminate Filesystem package.

15161.6M2.6k](/packages/illuminate-filesystem)[creocoder/yii2-flysystem

The flysystem extension for the Yii framework

2931.7M62](/packages/creocoder-yii2-flysystem)[flowjs/flow-php-server

PHP library for handling chunk uploads. Works with flow.js html5 file uploads.

2451.6M15](/packages/flowjs-flow-php-server)[madnest/madzipper

Easier zip file handling for Laravel applications.

1382.3M6](/packages/madnest-madzipper)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
