Tech Support Guy banner

..bat to edit timetable data based on date period

2030 Views 0 Replies 1 Participant Last post by  fscldhppr
Can the following (excerpted) airline timetable data(source.txt) be edited by a batch file to (output.txt) only those flights valid for a particular 1-week date period, including editing out invalid days of the week based on the same date period?

Example...based on search date pattern 3/1 - 3/7

From this:

6:45am 8:59am DL0095 0 7 M88
Above Disc. 2/8
8:00am 10:13am DL0095 0 6 319
Above 2/14 - 2/28
8:00am 10:13am DL0095 0 16 319
Above 3/2 - 3/7

8:00am 10:14am DL0095 0 123457 319
Above 2/15 - 3/1

8:00am 10:14am DL0095 0 2345 319
Above 3/3 - 3/6

8:00am 10:15am DL0095 0 123456 M88
Above 2/2 - 2/13
9:10am 11:18am DL0095 0 6 717
Above Eff. 3/14
9:10am 11:19am DL0095 0 123457 M88
Above Eff. 3/8

To this:

8:00am 10:13am DL0095 0 16 319 (both days 1 & 6 fall within the 3/1 - 3/7 date period)
Above 3/2 - 3/7
8:00am 10:14am DL0095 0 7 319 (only day 7(3/1) falls within 3/1- 3/7 date period, 12345 removed as they do not)
Above 2/15 - 3/1
8:00am 10:14am DL0095 0 2345 319 (all days "2345" fall within 3/1 - 3/7 date period)
Above 3/3 - 3/6

Here the invalid date periods have been removed from source file, and of the 3 remaining flights(output file)days have been removed based on the same date period(3/1 - 3/7)criteria.

For reference purposes(forum moderators/others)a previous request on this forum was made HERE in which an effective batch script was created, however, after sifting through output data it became obvious other parameters were required to fix several omissions(on my part, not script creator TheOutcaste)that led to "valid date period" flights being removed.

Thought it might be better to just open a new thread for perhaps different perspective/methods.

Thank you.
See less See more
Status
Not open for further replies.
1 - 1 of 1 Posts
1 - 1 of 1 Posts
Status
Not open for further replies.
Top