Cut the number of characters in all documents
-
Hi!
Please tell me how I can cut the number of characters in all txt documents?
I have thousands of txt documents with different number of characters, but I need to leave for all of them only 500 characters. Thank you! -
This sounds like a dangerous operation to me, so be sure you have a backup of all your files before beginning.
You could try a Replace In Files operation:
Find what:
(?s).{500}\K.*Replace with:
make sure this box is emptySearch mode:
Regular expression -
Thank you very much!
-
You replied very fast – did you try it? Did it work?
-
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login