|
-
Apr 28th, 2001, 05:37 PM
#1
Thread Starter
Fanatic Member
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]
-
Apr 28th, 2001, 09:51 PM
#2
Lively Member
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.
-
Apr 28th, 2001, 10:05 PM
#3
Lively Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|