Can someone please help me out for the following 2 requirement.
1. I have number of xls which is in ExcelName_YYYYMM.xls format. I want to read all the xls in a particular folder and put a flag as picked based on the value in the variable. Imagine I have below xls in a folder and value in a variable is 4 then it will put latest 4 records as PICK and rest as OTHERS.
2. Imagine I have log files in a folder.As you know there can be N number of log files for the same date(as the creation timestamp is different). So based on the value in the variable it should put flag as PICK and rest as OTHERS.For example if the value in the variable is 3 it should put flag as PICK for all the logs for the latest 3 dates and rest as archived. Imagine you have 5 logs for the frst date,10 for second date and 5 for third date and 200 for rest of the dates. then put flag as PICK for first 20 and rest 200 as OTHERS.
Hope my requirement is clear. If you have any questions please ask me.Hope someone can help me out on this.
Logfile_20121201.xls PICK(Put all the 5 files for this date as PICK)
Logfile_20121202.xls PICK(Put all the 10 files for this date as PICK)
Logfile_20121203.xls PICK(Put all the 5 files for this date as PICK)
Logfile_20121204.xls OTHERS(Put rest of the records as OTHERS From here)