Ok all done here is my code for that:
PHP Code:
if(ftp_chdir($conn, $www.$images)) {
$export = str_replace($_REQUEST['baseDir']."\\\\", "", $_REQUEST['f']);
$list = explode("#,#", $export);
for($i = 0; $i < sizeof($list) - 1; $i++)
{
$extension = ".".substr(strrchr($list[$i], '.'), 1);
$fileName = RemoveExtension($list[$i]);
ftp_rename($conn, $list[$i], filename_safe($fileName).$extension);
}
This gets the list, explodes it replaces all characters and basedir originally in list and then renames file on server without the bad extensions.
Thanks for everyones help.
Bookmarks