You are here: PSPad forum > English discussion forum > Split a txt file with pspad

Split a txt file with pspad

#1 Split a txt file with pspad

Posted by: Esgrimidor | Date: 2018-04-30 22:15 | IP: IP Logged

How can I split a txt file or similar with pspad according to a pattern ?
By example split in 6 equal parts.

Best Regards

--
Nice program indeed

Options: Reply | Quote | Up ^


#2 Re: Split a txt file with pspad

Posted by: pspad | Date: 2018-05-01 11:08 | IP: IP Logged

Hello
PSPad doesn't contains sych feature. But you can use scripting to write your own functionality what will make this job for you.

Options: Reply | Quote | Up ^


#3 Re: Split a txt file with pspad

Posted by: Esgrimidor | Date: 2018-05-01 20:52 | IP: IP Logged

How can I do that script for example.

Divide 1 to 10 equal parts eligible ?

Best Regards

--
Nice program indeed

Options: Reply | Quote | Up ^


#4 Re: Split a txt file with pspad

Posted by: pspad | Date: 2018-05-02 07:40 | IP: IP Logged

Hello

In the PSPad folder is file scripting.rtf
There is a list of commands you can use.
On the end of this file are 2 examples, how to copy text into new file and how to manipulate individual lines in editor.
You can use any scripting language supported by WSH (Windows Scripting Host) in your system. VBScript and JScript support is part of operating system.
In the PSPad folder .\Script\ is unders each language set of scripts you can get inspiration too.
In the PSpad help in chapter Customize PSpad / Script is detail description for each command, most with exapmples

Options: Reply | Quote | Up ^


#5 Re: Split a txt file with pspad

Posted by: Andreas | Date: 2018-05-02 11:14 | IP: IP Logged

If you use JavaScript as language then watch this examples how to split strings in parts.

Look at the JS-Code and the comments. You can change the code for a live preview.
codepen.io codepen.io/Aybee/pen/pVPgWG
codepen.io codepen.io/Aybee/pen/KRmWqG

Options: Reply | Quote | Up ^


#6 Re: Split a txt file with pspad

Posted by: Esgrimidor | Date: 2018-05-03 12:26 | IP: IP Logged

pspad:
Hello

In the PSPad folder is file scripting.rtf
There is a list of commands you can use.
On the end of this file are 2 examples, how to copy text into new file and how to manipulate individual lines in editor.
You can use any scripting language supported by WSH (Windows Scripting Host) in your system. VBScript and JScript support is part of operating system.
In the PSPad folder .\Script\ is unders each language set of scripts you can get inspiration too.
In the PSpad help in chapter Customize PSpad / Script is detail description for each command, most with exapmples

I'll try and comment.

--
Nice program indeed

Options: Reply | Quote | Up ^


#7 Re: Split a txt file with pspad

Posted by: Esgrimidor | Date: 2018-05-03 12:27 | IP: IP Logged

Andreas:
If you use JavaScript as language then watch this examples how to split strings in parts.

Look at the JS-Code and the comments. You can change the code for a live preview.
codepen.io codepen.io/Aybee/pen/pVPgWG
codepen.io codepen.io/Aybee/pen/KRmWqG

I'll try too. Time to learn !!!!!!

--
Nice program indeed

Options: Reply | Quote | Up ^


#8 Re: Split a txt file with pspad

Posted by: Esgrimidor | Date: 2018-05-04 21:02 | IP: IP Logged

I hope some day may be done a plugin or something.

I applied a freeware from sourceforge to split txt files with success.

But finally applied in the target forum pastebin.com no insert a large txt file.

So I only copy and paste from pspad to pastebin....

tongue sticking out smiley

My problem is that i am not a programmer. But some day i will be if necessary....

winking smiley

--
Nice program indeed

Options: Reply | Quote | Up ^


#9 Re: Split a txt file with pspad

Posted by: therium | Date: 2018-09-09 13:38 | IP: IP Logged

I had to write a Perl program for this where a new file was generated each time the original file had a '*****' on a line by itself.

Some of my text files are 70,000 lines or more.

PM me if you would like the program. You will need to install and know how to run a Perl program.

Edited 1 time(s). Last edit at 2018-09-09 13:38 by therium.

Options: Reply | Quote | Up ^


#10 Re: Split a txt file with pspad

Posted by: Esgrimidor | Date: 2018-09-09 22:13 | IP: IP Logged

Please put the link here for everybody.

I will try if you does.
I will learn to run a perl program.
Best Regards

--
Nice program indeed

Options: Reply | Quote | Up ^






Editor PSPad - freeware editor, © 2001 - 2024 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR