<?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[run system commands on save if certain criteria are met]]></title><description><![CDATA[<p dir="auto">I was wondering, is it possible to get Notepad++ to run some system commands if the current file’s folder meets some criteria?</p>
<p dir="auto">I use <a href="https://developers.google.com/apps-script/guides/clasp" rel="nofollow ugc">clasp</a> for developing Google Apps Script code. When you have a local copy of a Google Apps Script project the folder will have a <code>.clasp.json</code> file in it.</p>
<p dir="auto">I want it so if when I save a file and the folder has this <code>.clasp.json</code> file then it should automatically run a system command: <code>cmd /c "cd $(CURRENT_DIRECTORY) &amp;&amp; clasp push"</code>.</p>
<p dir="auto">Is this possible? I saw NppEventExec but could not figure out how to get it to do what I am after.</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/18164/run-system-commands-on-save-if-certain-criteria-are-met</link><generator>RSS for Node</generator><lastBuildDate>Sun, 19 Apr 2026 09:35:49 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/18164.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 31 Aug 2019 03:58:31 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to run system commands on save if certain criteria are met on Thu, 05 Sep 2019 14:30:31 GMT]]></title><description><![CDATA[<p dir="auto">Humm. Thank you! I will give it a try.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/46825</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/46825</guid><dc:creator><![CDATA[imthenachoman]]></dc:creator><pubDate>Thu, 05 Sep 2019 14:30:31 GMT</pubDate></item><item><title><![CDATA[Reply to run system commands on save if certain criteria are met on Wed, 04 Sep 2019 17:30:48 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/16283">@imthenachoman</a></p>
<p dir="auto">Yes, using the <code>Pythonscript</code> plugin for Notepad++ :</p>
<pre><code># -*- coding: utf-8 -*-

from Npp import editor, notepad, NOTIFICATION

def callback_npp_FILESAVED(args):
    for (filename, bufferID, index, view) in notepad.getFiles():
        if bufferID == args['bufferID']:
            # do your stuff with "filename" file here
            break

notepad.callback(callback_npp_FILESAVED, [NOTIFICATION.FILESAVED])
</code></pre>
]]></description><link>https://community.notepad-plus-plus.org/post/46794</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/46794</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Wed, 04 Sep 2019 17:30:48 GMT</pubDate></item><item><title><![CDATA[Reply to run system commands on save if certain criteria are met on Wed, 04 Sep 2019 16:20:02 GMT]]></title><description><![CDATA[<p dir="auto">I don’t know Lua but I know Python. So I could create a Python script to run a function on save that would check for the existence of a specific file in the directory and then run other system commands?</p>
]]></description><link>https://community.notepad-plus-plus.org/post/46790</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/46790</guid><dc:creator><![CDATA[imthenachoman]]></dc:creator><pubDate>Wed, 04 Sep 2019 16:20:02 GMT</pubDate></item><item><title><![CDATA[Reply to run system commands on save if certain criteria are met on Sat, 31 Aug 2019 15:09:05 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/16283">@imthenachoman</a> said:</p>
<blockquote>
<p dir="auto">I was wondering, is it possible to get Notepad++ to run some system commands if the current file’s folder meets some criteria?</p>
</blockquote>
<p dir="auto">you should use lua or python script plugin for get notification when file is being saved</p>
<p dir="auto"><img src="https://camo.nodebb.org/c8675e69f6e31f01b9226a6d46490e09691e9793?url=https%3A%2F%2Fuser-images.githubusercontent.com%2F3694843%2F50718697-43170e00-1060-11e9-9835-a0cda58e705c.gif" alt="link text" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.notepad-plus-plus.org/post/46712</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/46712</guid><dc:creator><![CDATA[rinku singh]]></dc:creator><pubDate>Sat, 31 Aug 2019 15:09:05 GMT</pubDate></item></channel></rss>