I am have difficulty deleting a file from my computer hard disk the file is a .dat file and its located in the users/all users/Norton folder. I want to delete the contents of the folder and sub folder till i delete the Norton folder. Here is the sample code
opendir(DIR, "$path/$new_folder/$new_folder1/$third_layer") || die("Un +able to opend $third_layer : $!\n\n"); my @third_layer = readdir(DIR); closedir(DIR); print("Third layer is : @third_layer\n\n"); shift(@third_layer); shift(@third_layer); print("@third_layer\n\n"); @third_layer = map{ $_ = "$path/$new_folder/$new_folder1/$third_layer/ +$_"}@third_layer; if(unlink(@third_layer)) { print("Successfully deleted the following data : @third_layer\n\n" +); }else { print("Unable to delete the following data : @third_layer\n\n"); }
Any help will be highly appreciated.
In reply to unable to delete dat files from a folder in windows all users/norton folder by 5plit_func
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |