473,320 Members | 1,600 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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

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

Feb 22 '07 #1
1 1858
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
<vj****@hotpop.comwrote in message
news:11**********************@s48g2000cws.googlegr oups.com...
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

Feb 22 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Tess | last post by:
Hi, Long time reader, first time poster... Any help is appreciated. I have a few questions regarding Winform controls embedded within an html page. For more info please see the appendix. Now,...
4
by: Bogosian | last post by:
I am working on an asp.net project.There is a subdir called OSearch,with a few aspx pages in it which as all other pages on the website use some controls.These controls are stored in a another...
6
by: Julien | last post by:
Hello, I have some files located in a file server and managed by a SQL database from a web based interface using ASP + VBSCRIPT technology. I need to automatically copy those files to a web...
5
by: mark_overstreet | last post by:
I have a generic data layer DLL that expects to read its connection string from it's own config file. The dll and config file have been placed in the bin directory (VS.NET2005). However, due to...
2
by: princymg | last post by:
I want to search a file from server and want to copy it to the local disk. how it is done? This is working if the file is in my hard disk itself.But not when it comes to server. If i map the server...
2
by: princymg | last post by:
I want to search a file from server and want to copy it to the local disk. how it is done? This is working if the file is in my hard disk itself.But not when it comes to server. If i map the server...
2
by: Bhavesh | last post by:
Hi everybody, I have problem in copying file from DatabaseServer to WebServer.Both machines are on LAN. Let me explain in details what i am doing & wht i want to achieve... I am using...
7
by: Arthur | last post by:
hi, this might be a simple one to them who know: i'm developing an asp.net project and use the debug mode. i have a xml file which contains data, that shall be read, if a specific page is...
3
by: David V | last post by:
I'm having trouble copying DLLs from a folder in my project to the project's output directory. I have copied seven SQL CE DLLs (the SqlCe*.dll set) to a Libs folder in my project. The DLLs VS...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.