i need to get only last 7days files from a folder. using vb.net.
in my C drive i have a folder called LogFiles, and inside that logfiles folder i have more than 15-25 log files were there. and the name of each file will be the date in which it created.
eg: 20070607.log (this file created today).
eg: 20070503.log (created last month 3rd).
so i need to get the last 7 days log file by checking with current date.
how can i find the last 7days files from this folder. if you have any idea how to do this please let me know. if example is there, it will be very helpful to me.
thanks in advance.
in my C drive i have a folder called LogFiles, and inside that logfiles folder i have more than 15-25 log files were there. and the name of each file will be the date in which it created.
eg: 20070607.log (this file created today).
eg: 20070503.log (created last month 3rd).
so i need to get the last 7 days log file by checking with current date.
how can i find the last 7days files from this folder. if you have any idea how to do this please let me know. if example is there, it will be very helpful to me.
thanks in advance.