Skip to content

Instantly share code, notes, and snippets.

View ppabcd's full-sized avatar
🏠
Working from home

Reza Juliandri ppabcd

🏠
Working from home
View GitHub Profile
@ppabcd
ppabcd / sort.php
Created June 2, 2019 09:28
Sort File by Extension Inside Folder Using PHP
<?php
$folder = __DIR__."/experimen/";
$moved_folder = __DIR__."/hasil/";
$extensions = [
"gambar" => ["jpg","png", "jpeg", "JPG", "svg"],
"video" => ["mkv", "mp4"],
"musik" => ["mp3"],
"document" => ["pdf","txt","xls", "epub", "docx", "xlsb"],
"compressed" => ["rar","zip", "tar.gz"],
"programming" => ["php", "py", "sql", "js", "html", "htm", "map", "phar"],