I need to write a batch file that can access a .dbf file (???pclk.dbf) and get the date from the PL_Date field in this file where the pl_class='O*'. I then want to use this as a parameter to run another batch file. There will always be at last 10 records with pl_class="O*". I need the last occurrance of this. The ???pclk.dbf file only has 3 fields PL_Date, PL_Route,PL_Class
The following is what I intend doing
Variable DayendDate
get last pl_date from ???pclk.dbf where pl_class="O*"
DayendDate= pl_date
beforend DayendDate
Please help with suggestions
I also want to use this date to check a directory for existing files with the next date name and then copy a file to this directory with the date name and increment the extention by 1 every time. eg: if dayendDate=20120127 and 20120128.1 , 20120128.2 is found in directory want to copy backp.zip to 20120128.3 in that directory.
Variable ExtIncrm
ExtIncm=(FileOccurrance in sub directory)
copy backup.zip to (DayEndDate).(ExtIncm+1)
Please Help!!!