Click here to Skip to main content
15,890,512 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
See more:
Hey guys,
Suppose i have a folder called "Client" and files in the folder. For example:

Client<br />
<br />
Client/client.res<br />
<br />
Client/client.inc<br />
<br />
Client/client.txt.txt


I want to merge the folder into one file with extension that no one else can view the files inside. Is that possible and if it is how? If i have to make a Data Merger how would i do it in c++?

Thanks
Posted
Comments
Philippe Mori 26-Aug-11 21:20pm    
Create a ZIP file and hide that file... But the file might not be really hidden if the user select to show hidden files.
cariolihome 27-Aug-11 5:57am    
You can use custom encryption or tools like disk enryptors

A really simple suggestion:
1. Create the merge file.
2. write file name length (file1)
3. write the file name (file1)
4. write the file size (file1)
5. write the file content (file1)
do the same for file2...fileN with the steps 2..5.
You can additional use an encryption function to encrypt before write.
To read the merged files:
1. Open the file.
2. Read the length of filename (file1)
3. Allocate the file name buffer and read the filename.
4. Read the file content length.
5. Read the file content and save it to the file (file1)
Repeat the steps 2..5 til end of file.
Regards.
 
Share this answer
 
Comments
SiL3NTK0D3R 27-Aug-11 17:26pm    
that would not work as i have alot of files in different folders which will be updates after some time.
mbue 27-Aug-11 18:08pm    
Thats true. Threfore you need to implement a filesystem based on a file. Perhaps take a look at microsoft storage object (IStorage Interface). But there are tools to examine the content, but you can prevent them by any kind of encryption.
Regards.
Sergey Alexandrovich Kryukov 29-Aug-11 1:18am    
My 5.
--SA
you can difine your own file format.
and then use fopen, fread, fwrite, fclose and so on, to make your own file.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900