| | |
Segmenting a file
Please support our C advertiser: Programming Forums - DaniWeb Sister Site
![]() |
If you know how to do file i/o (reads and writes) then the problem is pretty simple. Just open the main file for reading (binary mode) then create a series of small files (open them only one at a time) that will store XXX number of bytes. When the output file contains the desired number of bytes, close it and open another output file. Suggestion: give the names of the output fles some sequential identifier to make it easy for the fella on the other end of the TCP/IP to put the file back together again. For example "file001.txt", "file002.txt" ...
If you do not know how to do file i/o you will need to read a tutorial or text book for introduction.
If you do not know how to do file i/o you will need to read a tutorial or text book for introduction.
Last edited by Ancient Dragon; Aug 15th, 2006 at 10:19 am.
![]() |
Similar Threads
- connect to text file database (Visual Basic 4 / 5 / 6)
- Importing SQL Script File - Urgent !! (Database Design)
- Syntax for deleting specified file ( in C++) (C++)
- enabling file sharing (Windows NT / 2000 / XP)
- data file help (C)
- 81TB File Server (Networking Hardware Configuration)
Other Threads in the C Forum
- Previous Thread: fread, fwrite issues
- Next Thread: socket
| Thread Tools | Search this Thread |
Tag cloud for C
adobe ansi api array arrays bash binarysearch centimeter char convert copyanyfile copypdffile cprogramme createcopyoffile createprocess() csyntax directory dynamic fflush file fork frequency getlasterror givemetehcodez global graphics gtkgcurlcompiling hardware highest homework i/o ide inches infiniteloop initialization interest kilometer km lazy linked linkedlist linux linuxsegmentationfault list locate logical_drives match matrix meter microsoft motherboard multi mysql open opendocumentformat opensource openwebfoundation owf pattern pdf performance pointer pointers posix power problem probleminc program programming pyramidusingturboccodes read recursion recv repetition scanf scheduling segmentationfault send shape single socketprograming socketprogramming spoonfeeding stack standard strchr string strings structures suggestions system systemcall test testautomation unix user voidmain() wab win32api windows.h






