Top DevX Stories
Creating Custom Export Filters for StarOffice with XSLT
WPF Wonders: Using DataTemplates
Crystal Reports Family Offers Options for Developers
Avaya Aura Session Manager video
Avaya Aura Overview video
Search the forums:

Go Back   DevX.com Forums > DevX Developer Forums > C++

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 11-07-2009, 06:09 AM
karanmehra18 karanmehra18 is offline
Registered User
 
Join Date: Nov 2009
Posts: 1
how to store data in a folder

hi..i am writng a program.....i have collected a lot of information(name,hobbies etc.....) of about a hundred students in my school.......i have also stored their photographs in .jpeg format.........i am using Dev c++ and windows xp..........i want to store all this info + photos in a single file....how do i go about it............i started programmin a few days ago......so whatever u explain...please explain it in lay mans terms..........i dont want the entire code....but parts of the code ....it wud be great if you could explain it a bit n could give sources for me study it in greater detail
Reply With Quote
  #2  
Old 11-07-2009, 08:44 AM
jonnin jonnin is offline
Senior Member
 
Join Date: Dec 2003
Posts: 3,008
You can store many files into a single one, but the result cannot be used by anything except your program (to put them back to normal) -- the pictures cannot be seen, etc, because the file format is now way different that the standard jpeg format.

To do this, you simply open your current existing file, write the whole thing to a new file, insert some sort of "break" delimiter or start with the number of bytes or something like this to tell where one file stops and another starts. THen open the next file, and write it. Over and over, open a file, read it, write it all into your blob-file. One easy way to do this job is to use the free zip library to zip up all the files (zlib is its name) into a single file, this does all the work for you and the final file saves space too.


Now you mentioned folders in the topic, but not in your question. Did you mean, instead, "how do I copy the related files into a single folder" ?? If this is the case, there are several ways. You can open the existing file, open a file to write to, read the input and write the output, pretty much a done deal. You can also be lazy, and use operating system commands to do this inside your c++ code, the same way you would do it by typing commands in a command window.

Clarify what you really want to do here (the top or bottom option, or something else?) and I can toss some example code at you.

And please, use english this time. Its... annoying ... to read ... something.... like.... this!!!
Reply With Quote
  #3  
Old 11-07-2009, 11:01 AM
Danny's Avatar
Danny Danny is offline
Super Moderator
 
Join Date: Nov 2003
Posts: 3,948
Quote:
Originally Posted by jonnin View Post
And please, use english this time. Its... annoying ... to read ... something.... like.... this!!!
I Agree!
__________________
Danny Kalev
Reply With Quote
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Store data in to the XML file mndprasad XML 1 07-11-2008 02:00 PM
Data Service 2.0.0 zw_sea Java 0 05-28-2007 02:23 AM
MS Access - How to store various data types in the same field. Ron Weller Database 2 05-12-2007 05:11 PM
Why I can't save data in data base? Kurt Java 7 10-08-2006 09:59 AM
How to use SQL Server Text data type to store html documents Neen Help VB Classic 1 01-22-2001 02:57 PM


All times are GMT -4. The time now is 08:05 AM.


Sponsored Links



Acceptable Use Policy

internet.comMediabistrojusttechjobs.comGraphics.com

WebMediaBrands Corporate Info


Advertise | Newsletters | Feedback | Submit News

Legal Notices | Licensing | Permissions | Privacy Policy


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.