Results 1 to 3 of 3

Thread: File splitter/wrapper Program Help!

  1. #1

    Thread Starter
    Fanatic Member stickman373's Avatar
    Join Date
    Mar 2001
    Location
    MA
    Posts
    909

    Unhappy File splitter/wrapper Program Help!

    I am working on a program that splits files into smaller pieces and wraps these smaller pieces into jpeg files. I need to do wrap these files as jpegs for a project i'm working on. Anyways I have the program already able to split the files and save them as jpegs but i can't figure out how to compile them back into one file that i started with. If you think you can help i can send you the program with code. It would be to big to display here. It consists of a module nad form. Any helkp would be appreciated.

    E-MAIL: [email protected]

  2. #2
    Lively Member
    Join Date
    Apr 2001
    Location
    Central NC
    Posts
    75
    Assuming you know how to do the I/O, I presume your're stuck on the logistics.

    Let's say your base name is foo. Create your clumps in foo_1.jpg, ... foo_n.jpg. When you tell your unsplitter the base name, it'll look for all the foo_*.jpg files and glue them back together.

    Now, that's an acceptable method if you can be sure that all of the files are present. If you can't be sure that all the pieces are there, create a foo_0.jpg that tells the unsplitter what files belong in the set. Note that with that method, your file names need not follow any particular pattern.

  3. #3
    Lively Member
    Join Date
    Apr 2001
    Location
    Central NC
    Posts
    75
    PS: If you'd rather not fiddle with the I/O, just shell out and do a COPY:

    copy /b foo_*.jpg foo.jpg

    Since it does an ASCII sort on the file names, if you have more than 9 of them, make sure you insert a leading zero on those less than 10.

    Now that I think about it, I don't know if the wild-carded copy will work under 9x (it does under NT & 2000). If it doesn't, just generate a concatenated copy:

    copy /b foo_1.jpg+foo_2.jpg+...foo_n.jpg foo.jpg

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width