topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Tuesday April 16, 2024, 4:34 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Divide a txt file according rules  (Read 4405 times)

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
Divide a txt file according rules
« on: December 28, 2012, 11:45 AM »
I would like a software to divide in several parts a txt file according rules.
By example :
A txt file with 30 lines of text divide in three files of 10 lines each one.

Best Regards
 :-*

Josh

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Points: 45
  • Posts: 3,411
    • View Profile
    • Donate to Member
Re: Divide a txt file according rules
« Reply #1 on: December 28, 2012, 12:00 PM »
Is this the only rule you will need?

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 3,612
    • View Profile
    • Donate to Member
Re: Divide a txt file according rules
« Reply #2 on: December 28, 2012, 01:15 PM »
For that kind of stuff, Stahlworks' Swiss File Knife has been a most excellent choice. :Thmbsup:

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
Re: Divide a txt file according rules
« Reply #3 on: December 28, 2012, 01:32 PM »
Running to try
Best Regards
 ;D

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
Re: Divide a txt file according rules
« Reply #4 on: December 28, 2012, 02:09 PM »
 :(
How can i do that with SFK
It's a little difficult for me.
 :-[

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 3,612
    • View Profile
    • Donate to Member
Re: Divide a txt file according rules
« Reply #5 on: December 28, 2012, 02:12 PM »
Try like this: http://stahlworks.co...index.php?tool=split There's an example called "splitting text files by no. of lines"

kunkel321

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 597
    • View Profile
    • Donate to Member
Re: Divide a txt file according rules
« Reply #6 on: December 28, 2012, 02:20 PM »
For that kind of stuff, Stahlworks' Swiss File Knife has been a most excellent choice. :Thmbsup:
This is my new favorite thing!

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
Re: Divide a txt file according rules
« Reply #7 on: December 28, 2012, 02:25 PM »
Try like this: http://stahlworks.co...index.php?tool=split There's an example called "splitting text files by no. of lines"
:-*
I'll try and comment
 ;D

x16wda

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 888
  • what am I doing in this handbasket?
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: Divide a txt file according rules
« Reply #8 on: December 29, 2012, 09:17 AM »
Take a look at the Windows ports of Gnu Coreutils.  The Split command may do what you want:

C:\$DATA\$installers\copy-into-winnt>split --help
Usage: split [OPTION] [INPUT [PREFIX]]
Output fixed-size pieces of INPUT to PREFIXaa, PREFIXab, ...; default
PREFIX is `x'.  With no INPUT, or when INPUT is -, read standard input.

Mandatory arguments to long options are mandatory for short options too.
  -a, --suffix-length=N   use suffixes of length N (default 2)
  -b, --bytes=SIZE        put SIZE bytes per output file
  -C, --line-bytes=SIZE   put at most SIZE bytes of lines per output file
  -l, --lines=NUMBER      put NUMBER lines per output file
      --verbose           print a diagnostic to standard error just
                            before each output file is opened
      --help     display this help and exit
      --version  output version information and exit

SIZE may have a multiplier suffix: b for 512, k for 1K, m for 1 Meg.

Report bugs to <[email protected]>.
vi vi vi - editor of the beast

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
Re: Divide a txt file according rules
« Reply #9 on: December 29, 2012, 11:17 PM »
Try like this: http://stahlworks.co...index.php?tool=split There's an example called "splitting text files by no. of lines"

Thanks a lot Ath
Happy New Year !!!!!!!!!
 :P