473,378 Members | 1,317 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,378 software developers and data experts.

Something other than .txt's

19
Hey, guys. I'm working on a quote generating program that displays a random quote from a text file. I was just wondering if there was anyway to put that textfile inside of the .exe or make the txt file into something non-edittable. I'm new at this so I don't know all of my options. I would just like a little nudge in the right direction.

Any help would be appreciated. Thanks
Feb 9 '08 #1
2 1051
oler1s
671 Expert 512MB
I was just wondering if there was anyway to put that textfile inside of the .exe
Like making it a resource? Look up resource scripts and resource script files. Checking it under MSDN and a general Google search should give you a good overview.

or make the txt file into something non-edittable.
Well, if that really is your goal, then maybe you don't really need to go to the trouble of embedding it. If you don't care if the contents can be seen in plain sight, then a simple file extension change + CRC check at runtime should do the trick. Otherwise, you may need to encrypt the contents beforehand and then decrypt them on the fly.
Feb 10 '08 #2
gpraghuram
1,275 Expert 1GB
Hey, guys. I'm working on a quote generating program that displays a random quote from a text file. I was just wondering if there was anyway to put that textfile inside of the .exe or make the txt file into something non-edittable. I'm new at this so I don't know all of my options. I would just like a little nudge in the right direction.

Any help would be appreciated. Thanks

You can put the contents in the exe file.
I remember sometime back i read an article on this.
The idea would be
Open the exe in wb mode
Reach the end of the file
write your contents and then close the file.
But for this you should have a wrapper exe to call this and separate out the file
Raghuram
Feb 11 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

11
by: hokiegal99 | last post by:
How would I determine if a filename is greater than a certain number of characters and then truncate it to that number? For example a file named XXXXXXXXX.txt would become XXXXXX fname = files...
4
by: Robert | last post by:
something wrong in wx I wrote program training na Artificial Neural Network. It work well in console mode, but when I try to add GUI there is an error: FANN Error 10: Error reading info from...
5
by: One Handed Man [ OHM# ] | last post by:
I'm doing something stupid !, I must be because this throws no exception, but does not delete the file which "is" there. Amy ideas ? Try System.IO.File.Delete("c:\test.txt") Catch ex As...
3
by: Elezar Simeon Papo | last post by:
Hello All, I have a tab separated input file (data.txt) in text format - the file looks like this SCHOOL DEPART1 DEPART2 DEPART3 Harvard Economics Mathematics Physics...
0
by: Rudy | last post by:
Hello all! I am having problem wih filewatch, I think. Basicly I have a trigger that creates a file. Filewatch looks for a modified date on the file, than when it see's it, it should pop up a...
20
by: James | last post by:
I am new to vb.net (I am an old vb6 programmer). I cannot figure out an easy way to watch variables. In vb6 all I did was right click and could chose to stop execution when a variable chances as...
25
by: Jon Slaughter | last post by:
I have some code that loads up some php/html files and does a few things to them and ultimately returns an html file with some php code in it. I then pass that file onto the user by using echo. Of...
8
by: mpatharkar | last post by:
Hi all, I have one input file "pick no.txt" from which i have to find perticuler pattern and print it in to output file "Numbers.txt". The input file is 1."pick no.txt" Number:
3
by: aaronkmar | last post by:
Hello again Bytes and TGIF! I've got an index page (text version) that has a login form with data being sent to a file called pwcheck.php (txt version) With a good login the success message is...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.