• Howdy! Welcome to our community of more than 130.000 members devoted to web hosting. This is a great place to get special offers from web hosts and post your own requests or ads. To start posting sign up here. Cheers! /Peo, FreeWebSpace.net
managed wordpress hosting

Problem deleting a folder directory...

xzx

b&
b&
I can't delete a folder in my ftp account for some reason. I had invision bb in it, i deleted the data base and tried deleting all the files, but the some empty folders are remaining. How can i delete them?
 
There maybe some hidden files...

try this!

Code:
#!/usr/bin/perl
use strict;

#### Edit this ####
my $path_to_folder	=	q(/home/sites/yourdomain.com/www/forums);
###################

print "Content-Type: text/html\n\n";

chdir($path_to_folder) or die print "Could not change directory $path_to_folder: $!\n";

print "Begin Delete...<P>\n";

foreach (<*>) {
	chomp;
	if(!unlink($_)) { print "Could not delete $_: $!<BR>\n"; }
	else { print "Deleted $_<BR>\n"; }
}
if(!rmdir($path_to_folder)) { print "Could not delete $path_to_folder: $!<BR>\n"; }
else { print "Deleted $path_to_folder<BR>\n";

print "<P>Delete End<BR>\n";

__END__
 
Back
Top