<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Today's date instead of YYYYMMDD]]></title><description><![CDATA[<p dir="auto">Good day,</p>
<p dir="auto">I have a notepad++ file that I copy and paste from on a daily basis.</p>
<p dir="auto">I have this line:<br />
COPY TO .\lcpout\Removed-Mar2023\REMOVED-YYYYMMDD</p>
<p dir="auto">I manually replace the YYYYMMDD  with today’s date but is there a way to have the YYYYMMDD reflect today’s date instead of the place holder?</p>
<p dir="auto">Tx for your help,</p>
<p dir="auto">Yves</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/24257/today-s-date-instead-of-yyyymmdd</link><generator>RSS for Node</generator><lastBuildDate>Sat, 10 Oct 2026 01:37:35 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/24257.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 16 Mar 2023 13:19:36 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Today's date instead of YYYYMMDD on Thu, 16 Mar 2023 15:20:24 GMT]]></title><description><![CDATA[<p dir="auto">Anyway, here’s a demo script that could accomplish the goal.  I call it <code>ReplaceYyyymmddOnFileOpen.py</code>:</p>
<pre><code class="language-py"># -*- coding: utf-8 -*-

# references:
#  https://community.notepad-plus-plus.org/topic/24257

#-------------------------------------------------------------------------------

from Npp import *
import time

#-------------------------------------------------------------------------------

class RYOFO(object):

    def __init__(self):
        notepad.callback(self.fileopened_callback, [NOTIFICATION.FILEOPENED])
        notepad.callback(self.bufferactivated_callback, [NOTIFICATION.BUFFERACTIVATED])
        self.process_next_buf_act = False

    def fileopened_callback(self, args):
        self.process_next_buf_act = True

    def bufferactivated_callback(self, args):
        if self.process_next_buf_act:
            editor.replace('YYYYMMDD', time.strftime('%Y%m%d', time.localtime()))
            self.process_next_buf_act = False

#-------------------------------------------------------------------------------

try:
    ryofo
except NameError:
    ryofo = RYOFO()
</code></pre>
]]></description><link>https://community.notepad-plus-plus.org/post/84884</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/84884</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Thu, 16 Mar 2023 15:20:24 GMT</pubDate></item><item><title><![CDATA[Reply to Today's date instead of YYYYMMDD on Thu, 16 Mar 2023 14:43:50 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/yves-davignon" aria-label="Profile: Yves-Davignon">@<bdi>Yves-Davignon</bdi></a></p>
<p dir="auto">Ah.  So you mean that at the time of file opening, you want to do a replace on <code>YYYYMMDD</code> with the current date.  Gotcha.</p>
<p dir="auto">That would be fairly easy to script if you are willing to use a scripting plugin?  More detail on what would be required for that is <a href="https://community.notepad-plus-plus.org/topic/23039/faq-desk-how-to-install-and-run-a-script-in-pythonscript">HERE</a>.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/84880</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/84880</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Thu, 16 Mar 2023 14:43:50 GMT</pubDate></item><item><title><![CDATA[Reply to Today's date instead of YYYYMMDD on Thu, 16 Mar 2023 14:18:56 GMT]]></title><description><![CDATA[<p dir="auto">Tx Alan,</p>
<p dir="auto">That will indeed insert today’s date where the cursor is located.</p>
<p dir="auto">What I am/was looking for is a Date variable that I could insert in my file and when the notpad++ file is open, that date is populated with today’s date. If it can be done of course.</p>
<p dir="auto">Yves</p>
]]></description><link>https://community.notepad-plus-plus.org/post/84878</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/84878</guid><dc:creator><![CDATA[Yves Davignon]]></dc:creator><pubDate>Thu, 16 Mar 2023 14:18:56 GMT</pubDate></item><item><title><![CDATA[Reply to Today's date instead of YYYYMMDD on Thu, 16 Mar 2023 13:43:36 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/yves-davignon" aria-label="Profile: Yves-Davignon">@<bdi>Yves-Davignon</bdi></a></p>
<p dir="auto"><img src="/assets/uploads/files/1678974211747-e1721c30-b389-4c1f-bbdc-22f681d4d888-image.png" alt="e1721c30-b389-4c1f-bbdc-22f681d4d888-image.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.notepad-plus-plus.org/post/84876</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/84876</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Thu, 16 Mar 2023 13:43:36 GMT</pubDate></item></channel></rss>