PC Review


Reply
Thread Tools Rate Thread

Copy Content Text File in Project to a Folder or a String

 
 
vjunkl@hotpop.com
Guest
Posts: n/a
 
      22nd Feb 2007
Hello, I have a content text file in my project and I'd like to copy
it to a folder at some point in the execution of the application(not
during a build).

If this is not possible, how about reading a content text file into a
string. This will do the job just as well, maybe better.

Thanks in advance.

Vince

 
Reply With Quote
 
 
 
 
Eric Renken
Guest
Posts: n/a
 
      22nd Feb 2007
Can you embed the file as a resource and then you can stream the file out?

Here is an example of how I stream out a XML file from my DLL.

System.IO.Stream strm =
System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream(
"MyDll.MyXML.xml" );

XmlDocument dom = new XmlDocument();
dom.Load( strm );

You should be able to do the same thing with a text file. I do this all the
time with icons and other images that my program uses.

Hope that helps.

Eric Renken


<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hello, I have a content text file in my project and I'd like to copy
> it to a folder at some point in the execution of the application(not
> during a build).
>
> If this is not possible, how about reading a content text file into a
> string. This will do the job just as well, maybe better.
>
> Thanks in advance.
>
> Vince
>



 
Reply With Quote
Reply

Thread Tools
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 On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy Content Text File in Project to a Folder or a String vjunkl@hotpop.com Microsoft Dot NET Framework 1 22nd Feb 2007 11:06 PM
How do I copy a sound/pic from my resources folder/resx file in my project to a folder in mydocs? yatrix7@hotmail.com Microsoft VB .NET 0 23rd Aug 2006 03:48 PM
How to import a text file to Excel treating all input content are in string. Chittu Microsoft Excel Misc 1 22nd Jul 2005 06:37 AM
Read whole content of rich text format file into string variable =?Utf-8?B?VHJhbiBIb25nIFF1YW5n?= Microsoft Access VBA Modules 1 20th Feb 2004 07:23 AM
Importing Windows Folder Content to text file B. E. Microsoft Windows 2000 File System 1 29th Jul 2003 12:30 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:01 AM.