Click here to Skip to main content
15,867,488 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
How to convert a folder into string not file into string without use of 3rd party software such as win rar etc.

Thanks in advance
Posted
Comments
Mehdi Gholam 8-Feb-14 5:18am    
Your question makes little sense since a folder is a string.
agent_kruger 8-Feb-14 5:56am    
sir, like there are ways to convert file into string. I want to convert a folder into a string.
OriginalGriff 8-Feb-14 5:34am    
This is not a good question - we cannot work out from that little what you are trying to do.
Remember that we can't see your screen, access your HDD, or read your mind.
Perhaps if you gave us an example of what you are trying to achieve?
Use the "Improve question" widget to edit your question and provide better information.
agent_kruger 8-Feb-14 5:55am    
sir, like there are ways to convert file into string. I want to convert a folder into a string.
OriginalGriff 8-Feb-14 6:26am    
You can't "convert a file into a string" - a file is a sequence of bytes which may or may not represent characters which can be part of a string.

If you are trying to build a single structure that contains the content of all the files in a folder, then be aware that that is not a trivial task: you will have to implement some form of directory in your structure to support it.
It would probably be easier to use an external tool.

have a look at this MSDN page[^]

it shows you how to compress the contents of a folder into a file
 
Share this answer
 
Comments
agent_kruger 8-Feb-14 6:22am    
it means no other way but to use 3rd party software to convert folder into file.
BillWoodruff 8-Feb-14 10:50am    
+5 to Simon

Agent_Spock: The GZipStream facility that Simon shows a link to has been available in .NET since FrameWork 2.0.

That linked-to page shows an example of compressing/decompressing an entire directory: what more do you want ?
agent_kruger 8-Feb-14 16:13pm    
i already know that but not 3rd party but now i think to go with 3rd party software
You are unrealistically restricting your choices if you don't want to use 3rd party tools/libraries since you will have to write that functionality yourself.

Take a look at : https://sharpcompress.codeplex.com/[^]
 
Share this answer
 
Comments
agent_kruger 8-Feb-14 6:22am    
it means no other way but to use 3rd party software to convert folder into file.
as i said in the question no use of 3rd party software but i think i have to go for 3rd party software.
 
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