• PHP instead <?php and php> {PHP} and {/PHP}

    7
    1 Votes
    7 Posts
    379 Views
    S

    @Ekopalypse
    Thank you for your help! what a pitty. (right now it is easier to just copy the code in between the working <php …)

  • Macros in v8.5.2 warning

    Locked
    3
    0 Votes
    3 Posts
    219 Views
    Mr-BrunesM

    @mkupper Tx for the alert - I’ve no idea what happened there. Feel free to delete this topic.

  • Macro warning message on upgrade

    5
    0 Votes
    5 Posts
    500 Views
    Mr-BrunesM

    @PeterJones

    Ok apols for late reply to your original request on how the warning could be rewritten.

    Some background - I used to work as a field sales tech consultant for a tier 1 global data storage manufacturer and so was well versed in getting beaten up on engagements, nearly always for things that I wasn’t directly responsible for, but hey you’re there and folks want to unload, and often with justification. We often ended up rewriting all sorts of customer docs, but also shipped cases of European beer for the devs.

    It’s especially hard if you’re involved with data security or content creation, since any issues impact productivity in terms of wasted time and worst of all, potential loss of content or even the fear of the latter.

    Other than the golden rule of Don’t Break Stuff, (and if you must then prepare everyone by explaining the heck out of it) the general themes were to consider your audience and the impact for all of them e.g.
    Who – are the affected users
    What – is the change
    Why – is the change req’d
    When - is the impact
    Where - can you go for more info and on how to roll-back.

    I’m sure folks will say this is all overkill, and it would be for a crappy new app that didn’t create content, but that isn’t the case here, and so there are expectations! 😉 Ok time to stop rambling.

    On this particular change, I fell at the first fence i.e. I had no idea whether I was affected. Only a fool would conclude that they would not be affected if they didn’t understand the warning!

    Now I see your reply is updated, so thanks for considering the issue! :-)

  • 0 Votes
    15 Posts
    2k Views
    Xuân-Thơ HOÀNGX

    @mpheath
    Thanks!
    Checked! These fixes are included in version 8.6.6 (currently in the RC2 phase).

  • Remove lines between pasted content?

    2
    0 Votes
    2 Posts
    193 Views
    mkupperM

    @X88R88 said in Remove lines between pasted content?:

    Whats a way or a plugin to allow me to remove lines between pasted note content.

    Take a look at the “Replacing in a specific zone of text” part of FAQ: Generic Regular Expression (regex) Formulas

  • Lua: cannot add additional styles

    8
    1 Votes
    8 Posts
    328 Views
    PeterJonesP

    @Thaoky , @mpheath ,

    Thanks for confirming.

    I submitted PR 15088

  • DirectWrite enabled by default since v8.6

    4
    3 Votes
    4 Posts
    707 Views
    PeterJonesP

    @mkupper ,

    by default for new installations of Notepad++

    That is what “default” means in the User Manual. I am not going to change every single mention of the word “default” to give the caveat, because there are a lot [citation needed] of default settings in the Manual.

  • How to delete all lines found in another txt document

    13
    0 Votes
    13 Posts
    3k Views
    PeterJonesP

    @DimakSerpg ,

    REGEX IN NOTEPAD++ IS THE WRONG TOOL FOR THIS JOB!

    I created three sets of files:

    100,000 7-digit numbers in each, where it will delete about 1/3 of the ones from source.txt 1,000,000 7-digit numbers in each, where it will delete about 1/2 of the ones from source.txt 10,000,000 9-digit numbers in each, where it will delete about 1/3 of the ones from source.txt

    I started notepad++ -nosession -multiInst -noPlugin src1e5.txt del1e5.txt running on the regex for the smallest of those.
    Then in another Notepad++ session, I spend about 10minutes coding up a script in Perl, and made sure it worked on the 100,000 line file in under a second. It then worked on the 1,000,000 line file in about 4 seconds. And then it processed the 10,000,000 line file in 4 minutes.

    I then wrote up this post. By the time I was done with that, it still hadn’t finished running the regex in Notepad++.

    IyFwZXJsDQp1c2UgNS4wMTI7DQp1c2Ugd2FybmluZ3M7DQp1c2Ugc3RyaWN0Ow0KdXNlIFRpbWU6OkhpUmVzIHF3L3RpbWUvOw0KDQpwcmludCBTVERFUlIgc2NhbGFyIHRpbWUsICJcbiI7DQpteSBAc3JjID0gZG8geyBvcGVuIG15ICRmaCwgJzwnLCAnc3JjMWU3LnR4dCc7IDwkZmg+IH07DQpteSBAZGVsID0gZG8geyBvcGVuIG15ICRmaCwgJzwnLCAnZGVsMWU3LnR4dCc7IDwkZmg+IH07DQpteSAlaDsgQGh7QGRlbH0gPSBAZGVsOw0Kb3BlbiBteSAkZmgsICc+JywgJ291dDFlNy50eHQnOw0Kc2VsZWN0ICRmaDsNCiRcID0gIiI7DQpwcmludCBmb3IgZ3JlcCB7IWV4aXN0cyAkaHskX319IEBzcmM7DQpwcmludCBTVERFUlIgc2NhbGFyIHRpbWUsICJcbiI7DQo

    If you can figure out how to decode that text box using Notepad++, and run a perl script (not in Notepad++), it’s yours, for free, no tech support provided. Good luck,

  • Keyboard combo hosed config - how to recover

    4
    0 Votes
    4 Posts
    255 Views
    PeterJonesP

    @Mr-Brunes said in Keyboard combo hosed config - how to recover:

    The Q&A that I didn’t understand was https://community.notepad-plus-plus.org/topic/20992/disable-all-notepad-keyboard-shortcuts?_=1714585277224 and I had no idea what Macro Express is nor how it affects NPP.

    I had never heard of it when that person asked about its interface with Notepad++, either. It’s just some external application which sounded to me like it was similar to AutoHot Key in its behavior.

  • Change or match background and font themes on plugins?

    2
    0 Votes
    2 Posts
    143 Views
    EkopalypseE

    @X88R88

    As a general option? No.
    Npp itself tries its best to make the background and foreground color match, but fonts … not yet. A plugin author has to do that himself.

  • Adding Lines to text In Bulk

    2
    0 Votes
    2 Posts
    208 Views
    Mark OlsonM

    @Cansu-Bal
    If all you wanted to do was insert some text (which is fixed, and doesn’t depend on any properties of the file) followed by a newline at the beginning of a file, you can do that using the Find/replace form, Find in files tab:
    Find what: (?s)[^\r\n]*(\R)?.*
    Replace with: some text(?1${1}:\r\n)${0}
    Filter: *.txt (restrict to .txt files)
    Directory: whatever directory you want to edit files in
    In all subfolders: check if you want to edit all files in a directory’s tree, rather than just direct children of that directory.

    If you’re new to this kind of thing, let me emphasize that you should always Always ALWAYS backup your files before doing a bulk find/replace.

    Note that if you run this on a file with no newlines, it will insert a CRLF newline (\r\n in regular expressions) after some text. Otherwise, it will use the first newline found in the file.

    If you want to do a find/replace operation on a file that uses the name of the file, you could use a plugin, but since you are doing this on a large number of files, this is a job for other tools, not for Notepad++.

  • Display duplicate file names

    3
    0 Votes
    3 Posts
    274 Views
    RedBlue WriterR

    @PeterJones Thank you for your comments and time.

    ‘Update 2’ seems to be like that. The OS on my PC is Win 10 (64-bit). I code with ‘Notepad++’ on my PC. In this state, problems seem to occur when I run ‘Virtual Box’ and code and compile with ‘Microsoft Visual C++ 6.0’ on Win 7 (32-bit) or Win XP.

    I’d like to tell you what I just tested. Each time I save a file on VC++6.0 of Virtual Box, Notepad++ displays the same file name as many times as it has been saved.

  • [8.6.2] Display live console to work with Python script?

    6
    0 Votes
    6 Posts
    469 Views
    EkopalypseE

    @Ekopalypse said in [8.6.2] Display live console to work with Python script?:

    then you can use quit() as long as you understand what it does.

    Correction: this should actually read:

    then you can use exit() as long as you understand what it does.

  • is auto gcode line format conversion possible

    2
    0 Votes
    2 Posts
    163 Views
    mkupperM

    @Steve-Trevella

    Have you looked at either of these?

    CNC Gcode backplot/simulation plugin https://ncnetic.com/notepad-gcode-plugin

    I don’t know if either of those is capable of reading the formats you use and then writing the data in the other formats you want to use.

    I found the above links using Google for notepad++ cnc plugin as it seems what you are asking for is an editor that has the ability to “save-as” your drawing in various formats.

  • date and time on openning file

    2
    0 Votes
    2 Posts
    140 Views
  • enclose each character of string in {}

    6
    0 Votes
    6 Posts
    327 Views
    Bill KristyB

    @Alan-Kilborn @mkupper Thank you very much everyone, {$0} did the trick! Pure gold for me, thanks again!

  • 0 Votes
    9 Posts
    1k Views
    PeterJonesP

    @Alan-Kilborn said in Как поменять цвет и размер шрифта уведомления в окне поиска?:

    Or, it could be simpler and just use one color (currently the green, but to be made programmatic) for both.

    I added a comment to Issue #9309 with my suggested ideas of either using colors from Tones, or having the colors choosable in Preferences > Searching .

    I’m not hopeful that anything will ever come of that, but at least the suggestion is there.

  • NPP v8.6.5 crashes on Space or CRLF

    3
    1 Votes
    3 Posts
    329 Views
    mkupperM

    @Alan-Stu

    A couple of things:

    How long are the lines you are dealing with? You mentioned “one line of contiguous text (no spaces)”. Is the line hundreds of millions to billions of characters long? Notepad++ v8.6.3 had a regression and so was deleted and replaced with v8.6.4. Regarding “this crash behaviour started approximately when Android Studio was updated to Hedgehog 2023.1.1 Patch 2.” You will need to get far more specific about how to reproduce the Notepad++ issue before we can determine that Notepad++ now crashes due to some update or change to Windows or other software.

    I decided to re-test see if I can get something closer to your results.

    I had two sets of test files.

    The x series was created by multiplying the 100 characters ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuv resulting in a single long line. The y series was created by multiplying the 100 characters ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrst<cr><lf> resulting 98 character long lines that each use 100 bytes of disk storage.

    For Notepad++ v8.6.5 (32-bit) running with -noPlugin the results are:

    The x long line files open fine up to 100,000,000 bytes. At 200,000,000 bytes Notepad++ created a new tab for the file but never painted it. The ‘y’ short line files open fine up to 1,000,000,000 bytes. At 2,000,000,000 bytes I get a warning about Exception: File memory allocation failed with There is probably not enough contiguous free memory for the file being loaded by Notepad++ and the file fails to load. Notepad++ handles this more or less gracefully:

    With Notepad++ v8.6.5 (64-bit) running with -noPlugin the results are:

    The x long line files open fine up to 2,000,000,000 bytes and then allowed me to type a space and then <enter>. It’s getting ~slow~. At 3,000,000,000 bytes Notepad++ seemed to start loading the file but then vanished/exited few minutes later. The ‘y’ short line files open fine up to 10,000,000,000 bytes (100 million lines). I did not try with larger files as Notepad++ was fast and responsive. I have edited files in the 20gb range at times. We don’t know where the outer limits are.

    It appears that when we have a file with a single long line of [A-Za-z] characters only that Notepad++ has issues. For v8.6.5 (32-bit) they started somewhere over 100 million characters and v8.6.5 (64-bit) allowed for long lines up to 2-billion characters and was crashing at 3-billion characters.

  • question about compare with additional special chars and wildcard

    6
    0 Votes
    6 Posts
    319 Views
    guy038G

    Hi, @daniel-b-0 and All,

    Last UPDATED on 2024/05/22 : In the first version of this post, I exposed some real names of my personal photos. After reflection, I decided, for confidentiality, to change it and only show non-personal data !!

    I understand that my method cannot be used safely with files of important size. So, I’m going to expose an second method which should work in all cases !

    I experimented this new method with real data : A USB key of mine, containing 8,186 photos, collected over a period from 2004 to 2023

    ( Don’t worry, these photos are also stored on two external hard drives. In all circonstances, we must imitate the Mother Nature;, which uses RNA to code proteins and, NEVER, DNA itself for this purpose !! )

    The general organisation of my USB drive is :

    G:\_PHOTOS\2004\06_11-22_xxxxxxx - xxxxxxxxx - xxxxxxxxxxxxxx \01.jpg G:\_PHOTOS\2004\06_11-22_xxxxxxx - xxxxxxxxx - xxxxxxxxxxxxxx \02.jpg G:\_PHOTOS\2004\06_11-22_xxxxxxx - xxxxxxxxx - xxxxxxxxxxxxxx \03.jpg G:\_PHOTOS\2004\06_11-22_xxxxxxx - xxxxxxxxx - xxxxxxxxxxxxxx \03_ORG.jpg G:\_PHOTOS\2004\06_11-22_xxxxxxx - xxxxxxxxx - xxxxxxxxxxxxxx \04.jpg G:\_PHOTOS\2005\01_24-29_SKI_xxxx xxxx xxxxx\01.jpg G:\_PHOTOS\2005\01_24-29_SKI_xxxx xxxx xxxxx\02.jpg G:\_PHOTOS\2005\01_24-29_SKI_xxxx xxxx xxxxx\03.jpg G:\_PHOTOS\2005\01_24-29_SKI_xxxx xxxx xxxxx\04.jpg G:\_PHOTOS\2005\01_24-29_SKI_xxxx xxxx xxxxx\05.jpg G:\_PHOTOS\2005\01_24-29_SKI_xxxx xxxx xxxxx\06.jpg G:\_PHOTOS\2005\01_24-29_SKI_xxxx xxxx xxxxx\07.jpg G:\_PHOTOS\2005\01_24-29_SKI_xxxx xxxx xxxxx\08.jpg G:\_PHOTOS\2005\01_24-29_SKI_xxxx xxxx xxxxx\09.jpg G:\_PHOTOS\2005\01_24-29_SKI_xxxx xxxx xxxxx\10.jpg G:\_PHOTOS\2005\03_22_SKI_xx xxxxxxx\01.jpg G:\_PHOTOS\2005\03_22_SKI_xx xxxxxxx\02.jpg G:\_PHOTOS\2005\03_22_SKI_xx xxxxxxx\03.jpg G:\_PHOTOS\2005\08_22_xxxx xxxxxx\01.jpg G:\_PHOTOS\2006\01_07_xxxxxxx xxxxxxxxxxx\01.jpg ... ... ... G:\_PHOTOS\2023\10_01_xxxxx_xxxxx.jpg G:\_PHOTOS\2023\10_01_xxxxx_xxxxx.jpg G:\_PHOTOS\2023\10_08xxxxx xxxxx xxxxxxxxxxxx\01.jpg G:\_PHOTOS\2023\10_22_xxxxx_xxxxx_xxxxx\01.jpg G:\_PHOTOS\2023\12_02_xxxx_xxxxxx_xxxxxx\01.jpg G:\_PHOTOS\2023\12_15_xxxxxx xxxxxxx xxxxxxxx xxx\01.jpg G:\_PHOTOS\2023\12_15_xxxxxx xxxxxxx xxxxxxxx xxx\02.jpg G:\_PHOTOS\2023\12_15_xxxxxx xxxxxxx xxxxxxxx xxx\03.jpg G:\_PHOTOS\2023\12_15_xxxxxx xxxxxxx xxxxxxxx xxx\04.jpg G:\_PHOTOS\2023\12_15_xxxxxx xxxxxxx xxxxxxxx xxx\05.jpg G:\_PHOTOS\2023\12_15_xxxxxx xxxxxxx xxxxxxxx xxx\06.jpg G:\_PHOTOS\2023\12_15_xxxxxx xxxxxxx xxxxxxxx xxx\07.jpg G:\_PHOTOS\2023\12_15_xxxxxx xxxxxxx xxxxxxxx xxx\08.jpg G:\_PHOTOS\2023\12_15_xxxxxx xxxxxxx xxxxxxxx xxx\09.jpg G:\_PHOTOS\2023\12_15_xxxxxx xxxxxxx xxxxxxxx xxx\10.jpg G:\_PHOTOS\2023\12_15_xxxxxx xxxxxxx xxxxxxxx xxx\11.jpg G:\_PHOTOS\2023\12_15_xxxxxx xxxxxxx xxxxxxxx xxx\12.jpg G:\_PHOTOS\2023\12_15_xxxxxx xxxxxxx xxxxxxxx xxx\13.jpg G:\_PHOTOS\2023\12_26_xxxxx xxxxxxxxx xx xxxx xxxxxxx\01.jpg G:\_PHOTOS\2023\12_26_xxxxx xxxxxxxxx xx xxxx xxxxxxx\02.jpg G:\_PHOTOS\2023\12_26_xxxxx xxxxxxxxx xx xxxx xxxxxxx\03.jpg G:\_PHOTOS\2023\12_31_xxxxxx - xxxxxxxx\01.jpg

    So, sorted by year, then by motif ( month_day[-day]_location_reason or, sometimes, month_day[-day]_reason_location ) and finally by photo number, with, sometimes, the initial of the person who took the photo ( -A for Annie, my sister, -X for unknown, etc, )

    In order to mimic your download.txt file, I placed the \x02 delimiters right after the G:_PHOTOS\ part and right before the \xx.jpg part; giving this format :

    G:\_PHOTOS\2004\06_11-22_xxxxxxx - xxxxxxxxx - xxxxxxxxxxxxxx \01.jpg G:\_PHOTOS\2004\06_11-22_xxxxxxx - xxxxxxxxx - xxxxxxxxxxxxxx \02.jpg G:\_PHOTOS\2004\06_11-22_xxxxxxx - xxxxxxxxx - xxxxxxxxxxxxxx \03.jpg G:\_PHOTOS\2004\06_11-22_xxxxxxx - xxxxxxxxx - xxxxxxxxxxxxxx \03_ORG.jpg G:\_PHOTOS\2004\06_11-22_xxxxxxx - xxxxxxxxx - xxxxxxxxxxxxxx \04.jpg G:\_PHOTOS\2005\01_24-29_SKI_xxxx xxxx xxxxx\01.jpg G:\_PHOTOS\2005\01_24-29_SKI_xxxx xxxx xxxxx\02.jpg G:\_PHOTOS\2005\01_24-29_SKI_xxxx xxxx xxxxx\03.jpg G:\_PHOTOS\2005\01_24-29_SKI_xxxx xxxx xxxxx\04.jpg G:\_PHOTOS\2005\01_24-29_SKI_xxxx xxxx xxxxx\05.jpg G:\_PHOTOS\2005\01_24-29_SKI_xxxx xxxx xxxxx\06.jpg G:\_PHOTOS\2005\01_24-29_SKI_xxxx xxxx xxxxx\07.jpg G:\_PHOTOS\2005\01_24-29_SKI_xxxx xxxx xxxxx\08.jpg G:\_PHOTOS\2005\01_24-29_SKI_xxxx xxxx xxxxx\09.jpg G:\_PHOTOS\2005\01_24-29_SKI_xxxx xxxx xxxxx\10.jpg G:\_PHOTOS\2005\03_22_SKI_xx xxxxxxx\01.jpg G:\_PHOTOS\2005\03_22_SKI_xx xxxxxxx\02.jpg G:\_PHOTOS\2005\03_22_SKI_xx xxxxxxx\03.jpg G:\_PHOTOS\2005\08_22_xxxx xxxxxx\01.jpg G:\_PHOTOS\2006\01_07_xxxxxxx xxxxxxxxxxx\01.jpg ... ... ... G:\_PHOTOS\2023\10_01_xxxxx_xxxxx.jpg G:\_PHOTOS\2023\10_01_xxxxx_xxxxx.jpg G:\_PHOTOS\2023\10_08xxxxx xxxxx xxxxxxxxxxxx\01.jpg G:\_PHOTOS\2023\10_22_xxxxx_xxxxx_xxxxx\01.jpg G:\_PHOTOS\2023\12_02_xxxx_xxxxxx_xxxxxx\01.jpg G:\_PHOTOS\2023\12_15_xxxxxx xxxxxxx xxxxxxxx xxx\01.jpg G:\_PHOTOS\2023\12_15_xxxxxx xxxxxxx xxxxxxxx xxx\02.jpg G:\_PHOTOS\2023\12_15_xxxxxx xxxxxxx xxxxxxxx xxx\03.jpg G:\_PHOTOS\2023\12_15_xxxxxx xxxxxxx xxxxxxxx xxx\04.jpg G:\_PHOTOS\2023\12_15_xxxxxx xxxxxxx xxxxxxxx xxx\05.jpg G:\_PHOTOS\2023\12_15_xxxxxx xxxxxxx xxxxxxxx xxx\06.jpg G:\_PHOTOS\2023\12_15_xxxxxx xxxxxxx xxxxxxxx xxx\07.jpg G:\_PHOTOS\2023\12_15_xxxxxx xxxxxxx xxxxxxxx xxx\08.jpg G:\_PHOTOS\2023\12_15_xxxxxx xxxxxxx xxxxxxxx xxx\09.jpg G:\_PHOTOS\2023\12_15_xxxxxx xxxxxxx xxxxxxxx xxx\10.jpg G:\_PHOTOS\2023\12_15_xxxxxx xxxxxxx xxxxxxxx xxx\11.jpg G:\_PHOTOS\2023\12_15_xxxxxx xxxxxxx xxxxxxxx xxx\12.jpg G:\_PHOTOS\2023\12_15_xxxxxx xxxxxxx xxxxxxxx xxx\13.jpg G:\_PHOTOS\2023\12_26_xxxxx xxxxxxxxx xx xxxx xxxxxxx\01.jpg G:\_PHOTOS\2023\12_26_xxxxx xxxxxxxxx xx xxxx xxxxxxx\02.jpg G:\_PHOTOS\2023\12_26_xxxxx xxxxxxxxx xx xxxx xxxxxxx\03.jpg G:\_PHOTOS\2023\12_31_xxxxxx - xxxxxxxx\01.jpg

    In this way, we are sure that the zones, between delimiters, are unique like, for instance :

    G:\_PHOTOS\2010\00_abcde_fghij\01.jpg ... ... G:\_PHOTOS\2011\00_abcde_fghij\01.jpg

    Then, I randomized this file, using the N++ option :

    Edit > Line Operations > Sort Lines Randomly

    So my download.txt file looks like :

    G:\_PHOTOS\2014\08_01_xxxxxxxx xxxxxxxxxxxx\009_G.jpg G:\_PHOTOS\2010\03_06_SKI_xxxxxxxxxx-xxxxxxx\14.jpg G:\_PHOTOS\2011\01_15_SKI_xxxxxxxxx-xxxxxxx\06.jpg G:\_PHOTOS\2014\02_21-22_xxxxxxxxxx_xxxxxxxxxx xxxxxx\07.jpg G:\_PHOTOS\2012\08_07-22_xxxxxxxx xxxxxxxxx\034_X.jpg G:\_PHOTOS\2010\05_29_xxxxxxxxx xxxxxxx_xxxxxxxx\14.jpg ... ... ... G:\_PHOTOS\2014\09_13_xxxxxxxxxx_xxxxxxxxxx\023.jpg G:\_PHOTOS\2017\08_10-28_xx xxxx\013.jpg G:\_PHOTOS\2010\10_30-31_xxxxxx_xxxxxxxxxxxx xxxxx\076_X.jpg G:\_PHOTOS\2022\07_13-08_27_xx_xxxx\099_A.jpg G:\_PHOTOS\2016\03_05-07_SKI_xxxxxxxxxxxx\006.jpg G:\_PHOTOS\2014\03_24_SKI_xxxxxxx-xxxxxxxx\44.jpg

    Secondly, I created an exist.txt file, made of all the different zones, between the STX delimiters. I obtained a file of 366 lines, whose I randomly deleted 45 of them, giving a final exist.txt file with 321 lines. So, at the end of the new method, we should get a file of all the lines containing one of the missing 45 zones !

    Important :

    For a correct realization, you must use the last v8.6.5 version of Notepad++, which improves the multi-selection process !

    In all the search/replacements, listed below :

    The Wrap around option is checked

    The Regular expression search mode is checked

    All the other options are un-checked

    Let’s go :

    First, re-copy your download.txt file as mark.txt

    Open the mark.txt file in N++

    Open the Replace dialog ( Ctrl + H )

    SEARCH (?-s)^.*\x02(.+)\x02.*

    REPLACE $1

    Click on the Replace All button

    => We just keep the zones between delimiters

    Now, use the menu option Edit > Line Operations > Sort Lines Lexicographically Ascending

    Re-open the Replace dialog ( Ctrl + H )

    SEARCH (?-s)^(.+\R)\K\1+

    REPLACE Leave EMPTY

    Click on the Replace All button

    => The duplicate lines are deleted and your mark.txt file should have decreased drastically ! In my case, I did get a mark.txt file with only 366 different lines

    Then, append your exist.txt at the end of the mark.txt file. In my case, the file contains 366 + 321 so 687 lines

    Again, use the menu option Edit > Line Operations > Sort Lines Lexicographically Ascending

    Re-open the Replace dialog ( Ctrl + H )

    SEARCH (?-s)^(.+\R)\1

    REPLACE Leave EMPTY

    Click on the Replace All button

    => The mark.txt file should have decreased and now contains only the zones which require downloading. In my case, it contains, as expected, 45 lines / zones !

    If the last line of the mark.txt file ends with an EOL, delete the EOL characters of this last line

    Note :

    If all or some lines contain sub-folders, you’ll have to replace any \ character with a the literal \\ string

    Now, on column 1, do a zero-length COLUMN selection of all the lines ( indication N × 0 in the status bar )

    Type in a | pipe character

    Hit the Home key

    Hit the Backspace key

    => The file is changed into a one-line file

    Hit the Home key, again

    Delete the first | character

    Finally, save the mark.txt file, now a single-line file

    Remark :

    If the entire line contains more than 2,000 characters, split this long line in parts, right before a | char and delete any | remaining at beginning and/or end of the lines

    For example :

    abc|def|.......................|uvw|xyz 01|23|.........................|67|89 Of course, in this case, you'll have to REPEAT the MARK operation, described below, for each CREATED line

    Now, re-copy your download.txt file as to_do.txt

    Switch to the mark.txt tab, containing, most of a time, just a single line

    Select all the text ( Ctrl + A )

    Open the Mark dialog ( Ctrl + M )

    => The text should be automatically inserted in the dialog

    Check the Bookmark line and Purge for each search options ( IMPORTANT )

    Switch back to the to_do.txt tab

    Click on the Mark All button

    => Message of the dialog Mark: xxx matches in entire file ( 876, in my case )

    In the Bookmark margin, select, with the right-click button, the option Remove Unmarked Lines or use the menu option Search > Bookmark > Remove Unmarked Lines

    Click on the Clear all marks button of the Mark dialog

    Finally, save the to_do.txt file

    => You should get all the files that require downloading, In my theoric case, from the 45 zones to take in account, I got a list of 876 files / lines to “download” ;-))

    Best Regards,

    guy038

    P.S. :

    Here’s a tip to count a list of numbers :

    Do a multi-column selection of all these numbers, located anywhere in your current file

    Paste them in a new tab

    Do a zero-length COLUMN selection of all these numbers

    Hit the + sign

    Hit the Home key

    Hit the Backspace key

    Hit the End key

    Insert the = sign

    Copy all contents of this single line ( Ctrl + C )

    Open calc.exe

    Paste the contents of the clipboard ( Ctrl + V )

    => Here you are : the Windows calculator should show you the total of your **list of numbers ;-)) No possibility of errors and quick result !

    You may even count numbers in other bases !

  • 0 Votes
    9 Posts
    1k Views
    Alan KilbornA

    @Eoin-McCann did not return and thus did not create an issue himself, so I did it and it is found HERE.