<?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[i want to split my text file into 1332 different files at specific part and save in single folder]]></title><description><![CDATA[<p dir="auto">I have a file containing 1332 cif molecules. i want to convert them into 1332 different cif molecule files in a single folder.</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/26505/i-want-to-split-my-text-file-into-1332-different-files-at-specific-part-and-save-in-single-folder</link><generator>RSS for Node</generator><lastBuildDate>Fri, 16 Oct 2026 20:48:48 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/26505.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 27 Dec 2024 11:16:33 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to i want to split my text file into 1332 different files at specific part and save in single folder on Mon, 30 Dec 2024 03:18:17 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/guy038" aria-label="Profile: guy038">@<bdi>guy038</bdi></a> ,<br />
Sure am glad I didn’t suggest a dBASE Plus solution for this problem and end up in that list. &lt;g,d,r&gt;</p>
]]></description><link>https://community.notepad-plus-plus.org/post/98840</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/98840</guid><dc:creator><![CDATA[Lycan Thrope]]></dc:creator><pubDate>Mon, 30 Dec 2024 03:18:17 GMT</pubDate></item><item><title><![CDATA[Reply to i want to split my text file into 1332 different files at specific part and save in single folder on Sun, 29 Dec 2024 21:56:22 GMT]]></title><description><![CDATA[<p dir="auto">Hi, <a class="plugin-mentions-user plugin-mentions-a" href="/user/abhishek-sharma" aria-label="Profile: abhishek-sharma">@<bdi>abhishek-sharma</bdi></a>, <a class="plugin-mentions-user plugin-mentions-a" href="/user/alan-kilborn" aria-label="Profile: alan-kilborn">@<bdi>alan-kilborn</bdi></a>, <a class="plugin-mentions-user plugin-mentions-a" href="/user/peterjones" aria-label="Profile: peterjones">@<bdi>peterjones</bdi></a>, <a class="plugin-mentions-user plugin-mentions-a" href="/user/dr-ramaanand" aria-label="Profile: dr-ramaanand">@<bdi>dr-ramaanand</bdi></a>, <a class="plugin-mentions-user plugin-mentions-a" href="/user/mkupper" aria-label="Profile: mkupper">@<bdi>mkupper</bdi></a> and <strong>All</strong>,</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/peterjones" aria-label="Profile: peterjones">@<bdi>peterjones</bdi></a>, you said :</p>
<blockquote>
<p dir="auto">…we just politely point out to him when he’s pushing the boundaries (like this time).</p>
</blockquote>
<p dir="auto"><strong>Peter</strong>, I <strong>do</strong> thank you for your <strong>phrasing</strong> !</p>
<hr />
<p dir="auto">Note that I could have said, in my <strong>first</strong> post :</p>
<ul>
<li>
<p dir="auto">Hit the <strong><code>F5</code></strong> key</p>
</li>
<li>
<p dir="auto">Paste <strong><code>cmd /c gawk "BEGIN {n=0} {n++ ; print &gt; \"File_\"n\".txt\"}" File_All.txt</code></strong> in the zone</p>
</li>
<li>
<p dir="auto">Click on the <strong><code>Run</code></strong> button</p>
</li>
</ul>
<p dir="auto">On the other hand, I could have created a <strong>batch</strong> file, from within N++, called <strong><code>Split.bat</code></strong> :</p>
<pre><code class="language-sh">@echo off

cmd /c gawk "BEGIN {n=0} {n++ ; print &gt; \"File_\"n\".txt\"}" File_All.txt
</code></pre>
<p dir="auto">and then, use the <strong><code>Run &gt; Run...</code></strong> option and <strong>paste</strong> either <strong><code>cmd /c Split.bat</code></strong> or <strong><code>cmd /c $(FILE_NAME)</code></strong> !</p>
<hr />
<p dir="auto">Now, I’m going to tease you a little ! In these <strong>three</strong> posts, below, you’re actually using a <strong>similar</strong> approach than mime :</p>
<p dir="auto"><a href="https://community.notepad-plus-plus.org/post/26531">https://community.notepad-plus-plus.org/post/26531</a></p>
<p dir="auto"><a href="https://community.notepad-plus-plus.org/post/46881">https://community.notepad-plus-plus.org/post/46881</a></p>
<p dir="auto"><a href="https://community.notepad-plus-plus.org/post/50945">https://community.notepad-plus-plus.org/post/50945</a></p>
<p dir="auto">I grant you that, in the <strong>first</strong> post, you began your post with :</p>
<blockquote>
<p dir="auto">This is not a coding help forum.</p>
</blockquote>
<p dir="auto">And, regarding the <strong>second</strong> post, I understand that you were testing if the output of a <strong>long_line_text</strong> file was correct or not on a <strong>printer</strong> device !</p>
<hr />
<p dir="auto">Now, here is a solution which <strong>only</strong> uses the <strong><code>cmd</code></strong> command within N++ and, thus, would keep its <strong><code>on-topic</code></strong> status !</p>
<ul>
<li>Let’s suppose this <em>INPUT</em> text, pasted in the <strong><code>File_All.txt</code></strong> file :</li>
</ul>
<pre><code class="language-diff">Here is
a small
text
to test
if my
batch
file works
as expected
</code></pre>
<ul>
<li>
<p dir="auto"><strong>Copy</strong> the <strong><code>File_All.txt</code></strong> as <strong><code>File_For_Each_Line.bat</code></strong></p>
</li>
<li>
<p dir="auto">Open the <strong><code>File_For_Each_Line.bat</code></strong> file in Notepad++</p>
</li>
<li>
<p dir="auto">Add an <strong>empty</strong> line at the <strong>very beginning</strong> ( <em>IMPORTANT</em> )</p>
</li>
<li>
<p dir="auto">Choose the <strong><code>Language &gt; B &gt; Batch</code></strong> menu option</p>
</li>
<li>
<p dir="auto">Choose the <strong><code>Encoding &gt; Convert to ANSI</code></strong> menu option ( <em>IMPORTANT</em> )</p>
</li>
<li>
<p dir="auto">Open the <strong>Replace</strong> dialog ( <strong><code>Ctrl + H</code></strong> )</p>
</li>
<li>
<p dir="auto"><strong>Untick</strong> all the <strong>box</strong> otpions</p>
</li>
<li>
<p dir="auto">FIND <strong><code>(?-s)(.+)|\A\R</code></strong></p>
</li>
<li>
<p dir="auto">REPLACE <strong><code>(?1set /a NUM+=1 &amp; echo \1 &gt; file_%NUM%.txt:@echo OFF\r\nchcp 1252 &gt; NUL\r\nset NUM=1\r\n)</code></strong></p>
</li>
<li>
<p dir="auto"><strong>Tick</strong> the <strong><code>Wrap around</code></strong> option</p>
</li>
<li>
<p dir="auto">Select the <strong><code>Regular expression</code></strong> search <strong>mode</strong></p>
</li>
<li>
<p dir="auto">Click <strong>once</strong> on the <strong><code>Replace All</code></strong> button</p>
</li>
<li>
<p dir="auto"><strong>Save</strong> the modifications of the <strong><code>File_For_Each_Line.bat</code></strong> file</p>
</li>
</ul>
<p dir="auto">Now :</p>
<ul>
<li>
<p dir="auto">Hit the <strong><code>F5</code></strong> key</p>
</li>
<li>
<p dir="auto">Paste <strong><code>cmd /c File_For_Each_Line.bat</code></strong> in the zone</p>
</li>
<li>
<p dir="auto">Click on the <strong><code>Run</code></strong> button</p>
</li>
</ul>
<p dir="auto">or</p>
<ul>
<li>
<p dir="auto">Open a <strong>DOS</strong> command prompt</p>
</li>
<li>
<p dir="auto">Type <strong><code>File_For_Each_Line.bat</code></strong> and hit the <strong><code>Enter</code></strong> key</p>
</li>
</ul>
<p dir="auto">=&gt; You should get, in <strong>current</strong> directory, <strong>eight</strong> new files, from <strong><code>file_1.txt</code></strong> to <strong><code>file_8.txt</code></strong>, each containing <strong>one</strong> line of the <em>initial</em> <strong><code>File_All.txt</code></strong></p>
<p dir="auto">Voila !</p>
<p dir="auto">Best Regards,</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/98839</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/98839</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Sun, 29 Dec 2024 21:56:22 GMT</pubDate></item><item><title><![CDATA[Reply to i want to split my text file into 1332 different files at specific part and save in single folder on Sun, 29 Dec 2024 10:40:54 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mkupper" aria-label="Profile: mkupper">@<bdi>mkupper</bdi></a> said:</p>
<blockquote>
<p dir="auto">I’ll be a bit more sneaky and do this nearly all in Notepad++.</p>
</blockquote>
<p dir="auto">And to me this is much more palatable of a solution.<br />
Although it doesn’t entirely use Notepad++, it uses something external to Notepad++ that is present on every PC; specifically <code>CMD.exe</code> which is used to “run the newly created batch file”.<br />
We don’t want an extensive discussion of batch/CMD here, however.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/98821</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/98821</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Sun, 29 Dec 2024 10:40:54 GMT</pubDate></item><item><title><![CDATA[Reply to i want to split my text file into 1332 different files at specific part and save in single folder on Sun, 29 Dec 2024 03:31:19 GMT]]></title><description><![CDATA[<p dir="auto">I was reading through <a class="plugin-mentions-user plugin-mentions-a" href="/user/guy038" aria-label="Profile: guy038">@<bdi>guy038</bdi></a>’s reply and got excited when I read “very easy solution” and so continued to read until I saw …gnu…download the gawk-4.1.0-bin.zip…</p>
<p dir="auto">I’ll be a bit more sneaky and do this <em>nearly</em> all in Notepad++.</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/abhishek-sharma" aria-label="Profile: Abhishek-Sharma">@<bdi>Abhishek-Sharma</bdi></a></p>
<p dir="auto">Step 1 - Do a search/replace with:</p>
<p dir="auto"><strong>Search: <code>^</code><br />
Replace: <code>&gt;&gt;"%XFILE%" echo.</code></strong></p>
<p dir="auto">Step 2 - Do another search/replace with:</p>
<p dir="auto"><strong>Search: <code>(?-i)^(&gt;&gt;"%XFILE%" echo.data_(.+))</code><br />
Replace: <code>set XFILE=data_\2.cif\r\necho Generating %XFILE%\r\n\1</code></strong></p>
<p dir="auto">Step 3<br />
Add one line at the top of the file with <code>@echo off</code> and then save the file as <code>filename.bat</code> where filename is something you pick.</p>
<p dir="auto">step 4<br />
Run the newly created batch file. It should generate 1332 separate files named <code>data_something.cif</code> where <em>something</em> is the <code>data_...</code> name.</p>
<p dir="auto">Explanation - I made the assumption that each molecule starts with a <code>data_...</code> line and using those to generate the file name for each molecule.  The search/replace steps convert the file from .cif file format into a batch script that generates the .cif file content.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/98815</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/98815</guid><dc:creator><![CDATA[mkupper]]></dc:creator><pubDate>Sun, 29 Dec 2024 03:31:19 GMT</pubDate></item><item><title><![CDATA[Reply to i want to split my text file into 1332 different files at specific part and save in single folder on Sat, 28 Dec 2024 15:47:07 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/dr-ramaanand" aria-label="Profile: dr-ramaanand">@<bdi>dr-ramaanand</bdi></a> ,</p>
<p dir="auto">Please don’t answer <a href="https://community.notepad-plus-plus.org/topic/15958/faq-you-ve-asked-your-question-in-the-wrong-place">cookie baking</a> questions.</p>
<p dir="auto">If it’s borderline about text editing, like the question above, then the best thing for the original poster is to be pointed that “Notepad++ cannot do this;  a tool that might be able to is XYZ, but you will have to look elsewhere to find help for using that tool, because this is a Notepad++ forum, not an XYZ forum.”</p>
<p dir="auto">If it’s possible to answer in 1-2 sentences about the other tool, then as long as it’s presented with a caveat, “but further questions should be directed to an XYZ forum”, it will usually be tolerated.  And with <a class="plugin-mentions-user plugin-mentions-a" href="/user/guy038" aria-label="Profile: guy038">@<bdi>guy038</bdi></a> 's thousands of helpful Notepad++ specific answers, we just politely point out to him when he’s pushing the boundaries (like this time).</p>
<p dir="auto">But this is a Notepad++ forum, <em>not</em> a general computer -help forum, and not even a text-transformation forum.  Please keep questions and answers on topic.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/98802</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/98802</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Sat, 28 Dec 2024 15:47:07 GMT</pubDate></item><item><title><![CDATA[Reply to i want to split my text file into 1332 different files at specific part and save in single folder on Sat, 28 Dec 2024 02:23:49 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/guy038" aria-label="Profile: guy038">@<bdi>guy038</bdi></a> People come and ask here because they don’t know where else to ask, so please do help people like us even if it is unrelated to Notepad++ and you know the solution.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/98798</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/98798</guid><dc:creator><![CDATA[dr ramaanand]]></dc:creator><pubDate>Sat, 28 Dec 2024 02:23:49 GMT</pubDate></item><item><title><![CDATA[Reply to i want to split my text file into 1332 different files at specific part and save in single folder on Fri, 27 Dec 2024 18:22:52 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/guy038" aria-label="Profile: guy038">@<bdi>guy038</bdi></a> said :</p>
<blockquote>
<p dir="auto">Of course, I going to get some flak, from <a class="plugin-mentions-user plugin-mentions-a" href="/user/alan-kilborn" aria-label="Profile: alan-kilborn">@<bdi>alan-kilborn</bdi></a>, for showing something that does not concern Notepad++, ( so off-topic )</p>
</blockquote>
<p dir="auto">Here’s your flak.  As promised.  :-)<br />
We can’t devolve into solving everyone’s non-N++ problem.<br />
If we do, it becomes uninteresting for those that want to see Notepad++ problems presented and solved here.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/98792</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/98792</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Fri, 27 Dec 2024 18:22:52 GMT</pubDate></item><item><title><![CDATA[Reply to i want to split my text file into 1332 different files at specific part and save in single folder on Fri, 27 Dec 2024 17:44:37 GMT]]></title><description><![CDATA[<p dir="auto">Hello, <a class="plugin-mentions-user plugin-mentions-a" href="/user/abhishek-sharma" aria-label="Profile: abhishek-sharma">@<bdi>abhishek-sharma</bdi></a>, <a class="plugin-mentions-user plugin-mentions-a" href="/user/alan-kilborn" aria-label="Profile: alan-kilborn">@<bdi>alan-kilborn</bdi></a> and <strong>All</strong>,</p>
<p dir="auto">You said :</p>
<blockquote>
<p dir="auto">I have a file containing 1332 cif molecules. i want to convert them into 1332 different cif molecule files in a single folder.</p>
</blockquote>
<p dir="auto">Well, if <strong>each</strong> <em>cif molecule</em> corresponds to a <strong>single</strong> text line, here is a very <strong>easy</strong> solution :</p>
<hr />
<ul>
<li>
<p dir="auto">Rename your <strong>initial</strong> file as <strong><code>File_All.txt</code></strong></p>
</li>
<li>
<p dir="auto">Create a <strong>new</strong> folder in your laptop</p>
</li>
<li>
<p dir="auto">Move to this <strong>new</strong> folder</p>
</li>
<li>
<p dir="auto">Copy the <strong><code>File_All.txt</code></strong> file in this folder</p>
</li>
<li>
<p dir="auto">Now, from this link <a href="https://code.google.com/archive/p/gnu-on-windows/downloads" rel="nofollow ugc">https://code.google.com/archive/p/gnu-on-windows/downloads</a> , download the <strong><code>gawk-4.1.0-bin.zip</code></strong> archive,</p>
</li>
<li>
<p dir="auto"><strong>Double</strong>-click on this archive</p>
</li>
<li>
<p dir="auto">Extract the <strong>unique</strong> file <strong><code>gawk.exe</code></strong></p>
</li>
<li>
<p dir="auto">Open a <strong>CMD</strong> prompt window</p>
</li>
<li>
<p dir="auto">Type in the command <strong><code>gawk "BEGIN {n=0} {n++ ; print &gt; \"File_\"n\".txt\"}" File_All.txt</code></strong> and valid</p>
</li>
<li>
<p dir="auto">After a while, when finished, you should get <strong><code>1332</code></strong> files, ( from <strong><code>File_1.txt</code></strong> to <strong><code>File_1332.txt</code></strong> ), which contain <strong>one</strong> line, each !</p>
</li>
</ul>
<hr />
<p dir="auto">Now, <a class="plugin-mentions-user plugin-mentions-a" href="/user/abhishek-sharma" aria-label="Profile: abhishek-sharma">@<bdi>abhishek-sharma</bdi></a>, if <strong>each</strong> <em>cif molecule</em> is <em>NOT</em> a <strong>single</strong> line, just show us your file containing the <strong><code>1332</code></strong> <em>cif molecules</em> or <strong>part</strong> of this file !</p>
<p dir="auto">Of course, I going to get some flak, from <a class="plugin-mentions-user plugin-mentions-a" href="/user/alan-kilborn" aria-label="Profile: alan-kilborn">@<bdi>alan-kilborn</bdi></a>, for showing something that does <strong>not</strong> concern Notepad++, ( so <em>off-topic</em> ), but hey, the solution is so <strong>simple</strong> !</p>
<p dir="auto">Best Regards,</p>
<p dir="auto">guy038</p>
<p dir="auto"><strong>P.S.</strong> :</p>
<p dir="auto">Anyone can easily test my solution ! For example, if a <strong><code>File_All.txt </code></strong> contains <strong><code>17</code></strong> lines, after execution, you’ll get <strong><code>17</code></strong> <strong>new</strong> files, from <strong><code>File_1.txt</code></strong> to <strong><code>File_17.txt</code></strong></p>
]]></description><link>https://community.notepad-plus-plus.org/post/98788</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/98788</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Fri, 27 Dec 2024 17:44:37 GMT</pubDate></item><item><title><![CDATA[Reply to i want to split my text file into 1332 different files at specific part and save in single folder on Fri, 27 Dec 2024 12:42:23 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/abhishek-sharma" aria-label="Profile: Abhishek-Sharma">@<bdi>Abhishek-Sharma</bdi></a></p>
<p dir="auto">You need a programming language and some coding skills in order to do that.<br />
It is not something that Notepad++ can help you with.<br />
Sorry and good luck.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/98776</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/98776</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Fri, 27 Dec 2024 12:42:23 GMT</pubDate></item></channel></rss>