Identify lines longer than X characters in Notepad++
Samoht
-
brucine Posted messages 24494 Registration date Status Membre Last intervention -
brucine Posted messages 24494 Registration date Status Membre Last intervention -
Hello,
I’m in a bit of a pickle; I manage a small NAS for a client, but its file structure is too complex, so it often throws error messages saying that folder names are too long when copying/pasting...
I've created a txt file of the directory structure using the tree /f command, but I can’t exploit it correctly.
My idea was to find the lines containing more than 200 characters in Notepad++, for example, but since this software isn’t really my specialty, I’m stuck on the exact search command...
Thanks in advance to anyone who can give me some advice :)
Have a great day, everyone!
I’m in a bit of a pickle; I manage a small NAS for a client, but its file structure is too complex, so it often throws error messages saying that folder names are too long when copying/pasting...
I've created a txt file of the directory structure using the tree /f command, but I can’t exploit it correctly.
My idea was to find the lines containing more than 200 characters in Notepad++, for example, but since this software isn’t really my specialty, I’m stuck on the exact search command...
Thanks in advance to anyone who can give me some advice :)
Have a great day, everyone!
1 réponse
Hello,
Notepad++ can, to my knowledge, only search for strings, not their length.
The solution likely involves a batch script, as mentioned for example here, post 20, and where you need to remove the time function if you're not interested, replace leq 900 with gtr 200, and since it's not about deleting the original lines but only redirecting them to a log file:
https://www.developpez.net/forums/d519725/general-developpement/programmation-systeme/windows/scripts-batch/batch-compteur-nombre-caracteres-ligne-ligne/
Notepad++ can, to my knowledge, only search for strings, not their length.
The solution likely involves a batch script, as mentioned for example here, post 20, and where you need to remove the time function if you're not interested, replace leq 900 with gtr 200, and since it's not about deleting the original lines but only redirecting them to a log file:
https://www.developpez.net/forums/d519725/general-developpement/programmation-systeme/windows/scripts-batch/batch-compteur-nombre-caracteres-ligne-ligne/