Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Maximum number to split any file.

Maximum number to split any file.

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
15 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    Le rner
    wrote on last edited by
    #1

    Hi all, i want to split any file please tell me how can i find out the maximum number in which i can split the selected file. please help me for this. thanks in advance.

    To accomplish great things, we must not only act, but also dream; not only plan, but also believe.

    L 1 Reply Last reply
    0
    • L Le rner

      Hi all, i want to split any file please tell me how can i find out the maximum number in which i can split the selected file. please help me for this. thanks in advance.

      To accomplish great things, we must not only act, but also dream; not only plan, but also believe.

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Hi, I do not understand the question. There is nothing stopping you from splitting a 100 Megabyte file into 104857600 files containing 1 BYTE each. You can keep doing this forever until you run out of drive space. Can you clarify your question? What are you trying to achieve? Best Wishes, -David Delaune

      L 1 Reply Last reply
      0
      • L Lost User

        Hi, I do not understand the question. There is nothing stopping you from splitting a 100 Megabyte file into 104857600 files containing 1 BYTE each. You can keep doing this forever until you run out of drive space. Can you clarify your question? What are you trying to achieve? Best Wishes, -David Delaune

        L Offline
        L Offline
        Le rner
        wrote on last edited by
        #3

        I mean if there is a 100 mb file,so what are the maximum number in which i can split this file. so tell me this in general case for any file.

        To accomplish great things, we must not only act, but also dream; not only plan, but also believe.

        A 1 Reply Last reply
        0
        • L Le rner

          I mean if there is a 100 mb file,so what are the maximum number in which i can split this file. so tell me this in general case for any file.

          To accomplish great things, we must not only act, but also dream; not only plan, but also believe.

          A Offline
          A Offline
          Adam Roderick J
          wrote on last edited by
          #4

          Tell us your intention. We didn't understand what you want to achieve so that we can tell you a better solution. :confused:

          Величие не Бога может быть недооценена.

          L 1 Reply Last reply
          0
          • A Adam Roderick J

            Tell us your intention. We didn't understand what you want to achieve so that we can tell you a better solution. :confused:

            Величие не Бога может быть недооценена.

            L Offline
            L Offline
            Le rner
            wrote on last edited by
            #5

            I provide a file to split,and provide a field where i enter the numbers in which i want to split the file. i want to validate that number if its is exceed the maximum number of splitting. so now please tell me the solution or suggestion according to this.

            To accomplish great things, we must not only act, but also dream; not only plan, but also believe.

            A P L 3 Replies Last reply
            0
            • L Le rner

              I provide a file to split,and provide a field where i enter the numbers in which i want to split the file. i want to validate that number if its is exceed the maximum number of splitting. so now please tell me the solution or suggestion according to this.

              To accomplish great things, we must not only act, but also dream; not only plan, but also believe.

              A Offline
              A Offline
              Adam Roderick J
              wrote on last edited by
              #6

              I hope the maximum is as randor suggested. But optimal condition may be according to your need. if application dont bother about time but memory then split into small size and large number of file say 5-10k. but if your application bother about time them split into 250-512k size files

              Величие не Бога может быть недооценена.

              1 Reply Last reply
              0
              • L Le rner

                I provide a file to split,and provide a field where i enter the numbers in which i want to split the file. i want to validate that number if its is exceed the maximum number of splitting. so now please tell me the solution or suggestion according to this.

                To accomplish great things, we must not only act, but also dream; not only plan, but also believe.

                P Offline
                P Offline
                pallaka
                wrote on last edited by
                #7

                Let me tell you the splitting of files will not be depended on the file size and the number of partitions. I mean if you have 10Mb file if u need to divide it in to 10 files then each file will have 1024kb and 128 byte extra to identify the next file link.But as you have 128 byte*10 extra bytes to store your file size willbe more once you add the size of all files.

                1 Reply Last reply
                0
                • L Le rner

                  I provide a file to split,and provide a field where i enter the numbers in which i want to split the file. i want to validate that number if its is exceed the maximum number of splitting. so now please tell me the solution or suggestion according to this.

                  To accomplish great things, we must not only act, but also dream; not only plan, but also believe.

                  L Offline
                  L Offline
                  Lost User
                  wrote on last edited by
                  #8

                  "_$h@nky_" wrote:

                  o now please tell me the solution or suggestion according to this.

                  There is no maximum, except the value that you decide. As Randor said, if you have a 1MB source file you can split into 1048576 1-byte subfiles. Maybe if you explain why you want to do this then a better suggestion could be made.

                  M 1 Reply Last reply
                  0
                  • L Lost User

                    "_$h@nky_" wrote:

                    o now please tell me the solution or suggestion according to this.

                    There is no maximum, except the value that you decide. As Randor said, if you have a 1MB source file you can split into 1048576 1-byte subfiles. Maybe if you explain why you want to do this then a better suggestion could be made.

                    M Offline
                    M Offline
                    Michael Schubert
                    wrote on last edited by
                    #9

                    Richard MacCutchan wrote:

                    There is no maximum

                    Actually, the maximum would be the number of clusters on a given partition.

                    L L 2 Replies Last reply
                    0
                    • M Michael Schubert

                      Richard MacCutchan wrote:

                      There is no maximum

                      Actually, the maximum would be the number of clusters on a given partition.

                      L Offline
                      L Offline
                      Le rner
                      wrote on last edited by
                      #10

                      thanks

                      To accomplish great things, we must not only act, but also dream; not only plan, but also believe.

                      1 Reply Last reply
                      0
                      • M Michael Schubert

                        Richard MacCutchan wrote:

                        There is no maximum

                        Actually, the maximum would be the number of clusters on a given partition.

                        L Offline
                        L Offline
                        Lost User
                        wrote on last edited by
                        #11

                        Michael Schubert wrote:

                        Actually, the maximum would be the number of clusters on a given partition.

                        The likelihood of reaching this is quite small, which is why I ignored it. I was more interested in trying to discover what he was trying to do, but I guess we'll never know.

                        A M 2 Replies Last reply
                        0
                        • L Lost User

                          Michael Schubert wrote:

                          Actually, the maximum would be the number of clusters on a given partition.

                          The likelihood of reaching this is quite small, which is why I ignored it. I was more interested in trying to discover what he was trying to do, but I guess we'll never know.

                          A Offline
                          A Offline
                          Adam Roderick J
                          wrote on last edited by
                          #12

                          Cluster size is very small usually, if NTFS then it can have maximum default value of 4 KB. It will be not problem to keep file size greater than 4KB. In Actual scenario, no application can create a huge amount of file, so we can ignore it as Richard said. If such a design is done then it should have a strong reason else your design is having some big problem.

                          Величие не Бога может быть недооценена.

                          M 1 Reply Last reply
                          0
                          • L Lost User

                            Michael Schubert wrote:

                            Actually, the maximum would be the number of clusters on a given partition.

                            The likelihood of reaching this is quite small, which is why I ignored it. I was more interested in trying to discover what he was trying to do, but I guess we'll never know.

                            M Offline
                            M Offline
                            Michael Schubert
                            wrote on last edited by
                            #13

                            Richard MacCutchan wrote:

                            I was more interested in trying to discover what he was trying to do, but I guess we'll never know.

                            I think his question was purely academic, his (her?) responses would indicate that.

                            1 Reply Last reply
                            0
                            • A Adam Roderick J

                              Cluster size is very small usually, if NTFS then it can have maximum default value of 4 KB. It will be not problem to keep file size greater than 4KB. In Actual scenario, no application can create a huge amount of file, so we can ignore it as Richard said. If such a design is done then it should have a strong reason else your design is having some big problem.

                              Величие не Бога может быть недооценена.

                              M Offline
                              M Offline
                              Michael Schubert
                              wrote on last edited by
                              #14

                              I think his question was academic and since you can split a file into an infinite number of zero byte files (theoretically), the limit would be the number of clusters of the given partition.

                              A 1 Reply Last reply
                              0
                              • M Michael Schubert

                                I think his question was academic and since you can split a file into an infinite number of zero byte files (theoretically), the limit would be the number of clusters of the given partition.

                                A Offline
                                A Offline
                                Adam Roderick J
                                wrote on last edited by
                                #15

                                Yes it seems to be, 5* for this guess :-D

                                Величие не Бога может быть недооценена.

                                1 Reply Last reply
                                0
                                Reply
                                • Reply as topic
                                Log in to reply
                                • Oldest to Newest
                                • Newest to Oldest
                                • Most Votes


                                • Login

                                • Don't have an account? Register

                                • Login or register to search.
                                • First post
                                  Last post
                                0
                                • Categories
                                • Recent
                                • Tags
                                • Popular
                                • World
                                • Users
                                • Groups