Forum Moderators: coopster
I need to delete a compressed backup file after it has been sucessfully uploaded to a ftp server, the upload works fine using CRON and a php page.
I have tried to delete the file using:
<?
$oldfile = "/home/#*$!/backup-10.8.2005_07-00-01_yyy.tar.gz";
unlink($oldfile);
?>
However I get a permission denied, what's wrong?
Also, I don't know the exact file name, so what I really want to do is wildcard the file name like this:
<?
$oldfile = "/home/xxx/backup-*_yyy.tar.gz";
unlink($oldfile);
?>
Is this possible?
Thanx
PeterC