Skip to content

Instantly share code, notes, and snippets.

@Grendel7
Grendel7 / clean-invalid-files.php
Created February 17, 2024 21:27
Delete files with backticks in the file name
<?php
$files = scandir('.');
foreach ($files as $file) {
if (strpos($file, '\\') !== false) {
echo "Deleting {$file}<br>";
unlink($file);
}
}