1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

..bat to edit timetable data based on date period

Discussion in 'DOS/Other' started by fscldhppr, Mar 9, 2015.

Thread Status:
Not open for further replies.
  1. fscldhppr

    fscldhppr Thread Starter

    Joined:
    Mar 29, 2010
    Messages:
    30
    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.
     
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/1144467

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice