I just wanted to get some tips as how to get the time stamp, this is on a windows environment but I'm able to execute some unix commands thanks to the MKS kit. Anywho, here is my code tell me what I'm doing wrong!
Code:
#This script searches the folders in the current
#directory, if it empty it deletes the directory
#If it contains something, it will leave it alone
$directory_one = 'Y:\archive1\\';
system(cls);
print "\nProcessing 1, Please wait...\n";
chdir($directory_one) ||
die "Cannot change directory to $directory_one: $!";
opendir(directory,".") ||
die "Cannot open the directory . (Directory may not exist): $!";
@folder_list = <*>;
system(cls);
print "\nProcessing 2, Please wait...\n";
foreach $application (@folder_list){
@releases = qx("ls -lR $application");
foreach $release (@releases){
($READTIME, $WRITETIME) = (stat($release))[8,9];
print "Release: $realease\n";
#print "Readtime: $READTIME \n";
#print "WriteTime: $WRITETIME \n";
}
print "\n=================================================================\n";
}
closedir(directory);