Community
    • Login

    Have a file (120 lines) with a date (2016-08-18) in line 72. I need to write a macro/script to open the file daily at 00h01and update that date value to dynamic "today"

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    2 Posts 2 Posters 1.7k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Frits ErasmusF
      Frits Erasmus
      last edited by

      I have a file consisting of about 100 lines, so it is small.
      In the file is a date field in the format: (CCYY-MM-DD) after the characters “iso” - the only ISO in the file!
      I would like to run a script just after midnight to update this date value to show today’s date.

      Is there anybody that could help me to;

      1. Understand what the bat file would look like to call the script (UpdateDate.bat)
      2. What is in the script to start the Macro (Macro1)
      3. Please include this save and exit portion in the macro so I can close the program elegantly as well.

      I know how to schedule the bat file to run at a specific time, but the rest is still clouded. I have no idea what the function is to call @today

      Your help will be greatly appreciated.

      Kind Regards

      Frits

      1 Reply Last reply Reply Quote 0
      • Jim DaileyJ
        Jim Dailey
        last edited by

        A DOS script master could probably do this with only shell commands in the batch file, but it is likely done easier by invoking some scripting language like AWK, PERL, or Python. It might even be possible using NPP, but I wouldn’t try to do it that way.

        1 Reply Last reply Reply Quote 2
        • First post
          Last post
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors