<?php
$d = dir("./");
while (false !== ($entry = $d->read())) {
   $fil[] = $entry;
}
$d->close();

$names = "EPIXAS
SPECUX
SUBSAT
TRADIPH
THEOVE
ANIGEN
POPSAT
CAMPICA
AUDIDOX
AUDIKAGE
ARIENATION
BAVAL
SUNSAT
YUCADUCE
SPAGYRET
MANSAT
WINWARE
CINEGON
WANG
EXPELUS
ANGEMORPH
GNOMIO
HASIDOPE
CAKREUZ
LYTAME
SUBLIMOR
PROPE
ATLANTACE
WAKETURE
PARALOOD
WYTOME
XENOTONG
MAVE
PHARET
NAPCER
CONTOR
NILTOS
TARTIC
EXTISS
LUNAHOLE
XETIGO
SCAMITE
STEELISS
INNOVINSE
PLAGIROS
CLOUDANT
KABABLE
UNOQUTE
GARACAL
BENDEX
PATEHAGE
SPACONT
PROXUTH
PATOR
ATLANTIM
NITROTECH
DECINS
ANALORIA
MEVAL
CATSTAR
TRIBAX
AUTOCHESH";
//print_r($fil);
$key = 0;
$names = explode("\n", $names);
foreach ($fil as $file)
{
$newname = strtolower(urlencode($names[$key]).".txt");
$newname = str_replace("%","", $newname);
$newname = str_replace("0","", $newname);
rename($file , strtolower(str_replace("\n","",$newname)).".txt");
$key ++;
