in reply to How to delet file on last 3 month ? ....

"how to delete file on last 3 month (based on file date ) ?"

Unfortunately, you're not really specific of exactly *which* "file date" you want, for there are three sorts of times for each file, namely:

• atime
Access time. This is the time that the file was last opened
• ctime
Change time. This time changes when you change ownership, permissions and what not (once again, it's not creation time)
• mtime
Modification time. This specifies when the file was last changed (the contents of the file).

But, you're lucky, 'cause with File::Finder, you can look for all of the above (you probably want to check for mtime). Once you found the right files, you can use unlink to delete them.

--
b10m
  • Comment on Re: How to delet file on last 3 month ? ....