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

Create your own file type

daniel aristidou
491 256MB
hi guys...i want to make files that can be opened only by my application.
ie a file type unique to my application, does anyone know how to do this?
Jun 14 '08 #1
7 2687
Check this
http://www.daniweb.com/forums/thread79688.html
Jun 16 '08 #2
daniel aristidou
491 256MB
Check this
http://www.daniweb.com/forums/thread79688.html
hi this is a very useful thread, however, it does not tell me how to save data to my custom file
Jun 18 '08 #3
kadghar
1,295 Expert 1GB
your 'own file type' can be a plain text file, where the info is stored in an specific way

lets say your program writes text with some format, then you can asign the first line to format, and from the second line on, the text the user wrote. So a saved file will be something like:

Expand|Select|Wrap|Line Numbers
  1. arial 12 bold
  2. dear mr.
  3. this is a sample letter...
you can save it with any extension you want, and there you go, you have your own file type.

if you want to be more sofisticated, use or create a ripper. If you like numbers and that stuff, you'll find very amusing creating your own (geek ^.^).

HTH
Jun 18 '08 #4
daniel aristidou
491 256MB
your 'own file type' can be a plain text file, where the info is stored in an specific way

lets say your program writes text with some format, then you can asign the first line to format, and from the second line on, the text the user wrote. So a saved file will be something like:

Expand|Select|Wrap|Line Numbers
  1. arial 12 bold
  2. dear mr.
  3. this is a sample letter...
you can save it with any extension you want, and there you go, you have your own file type.

if you want to be more sofisticated, use or create a ripper. If you like numbers and that stuff, you'll find very amusing creating your own (geek ^.^).

HTH
Thanks for the reply, what is a ripper?- sounds like fun

i considered the Txt file way, however i want the information to be inacceasable to other programs.
Jun 18 '08 #5
jeffstl
432 Expert 256MB
Thanks for the reply, what is a ripper?- sounds like fun

i considered the Txt file way, however i want the information to be inacceasable to other programs.
If you name the file with your own custom extension, it will be inaccessible to other programs by default. Because the program won't recognize the extension.

A savvy user will obviously be able to get around this but....., if you want even better security then that then you will need to encrypt the data in the file, and have your own alogorithim decrypt the data back to a recognizable format by your program.

Either way, no matter which way you look at thats exactly what a file is. ASCII or binary data. You can't really get around that. If you try hard enough most ANY file can be opened in notepad after all...try it. The only ones that won't be recognizable are binary formats like images, movies, and other media....or files that are encrypted as I described
Jun 18 '08 #6
jeffstl
432 Expert 256MB
Just as some examples....try opening the following file types from within notepad

.vbp, .tmp, .dat, etc

You will find that there is data within these files viewable from notepad. The only difference is that if you open .vbp with Visual basic it interprets it differently and uses the data in the file to display your visual basic project.

Many programs use this same kind of style and give the file thier own extension.
Jun 18 '08 #7
kadghar
1,295 Expert 1GB
Thanks for the reply, what is a ripper?- sounds like fun

i considered the Txt file way, however i want the information to be inacceasable to other programs.
a ripper is a tool to encript info.

lets do a very simple example
i'll change each letter for the next one in the alphabet, so if you have

Hello

i'll will save in the text file:

Ifmmp

and when it reads it, it'll do de opposite action.

^.^ of course there are many very crazy algorithms to do this (and to undo it).
Jun 18 '08 #8

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

Similar topics

3
by: anon | last post by:
I have been used to using DAO in the past, and then converted to ADO. Now I am having to use VB.Net(2000) and ADO.NET and am experiencing difficulties with the creation and population of an mdb....
6
by: Martin | last post by:
Hi, I have a xml file like the one below <?xml version="1.0" encoding="utf-8"?><e1 xmlns:e1="http://tempuri.org/Source1.xsd" e1:att1="1" e1:att2="2" e1:rest="345"/> If I try to create a...
7
by: dog | last post by:
I've seen plenty of articles on this topic but none of them have been able to solve my problem. I am working with an Access 97 database on an NT4.0 machine, which has many Access reports. I...
0
by: I Decker | last post by:
Hi all, Hope this is the right group. I am writing a program in c# to open create an excel document, enter some data, save it and then email it as an attachment. I have successfully created...
3
by: Amjad | last post by:
Hi, I just wrote a test Windows Service that creates a text file on startup (please see my code below). The file is never created. Protected Overrides Sub OnStart(ByVal args() As String) Dim...
11
by: mesut demir | last post by:
Hi All, When I create fields (in files) I need assign a data type like char, varchar, money etc. I have some questions about the data types when you create fields in a file. What is the...
6
by: windandwaves | last post by:
Hi Folk Some of my clients asked me to create "fancy emails" for them (aka html formatted emails). I know how to make a nice html document, but I had trouble creating a simple way to provide...
23
by: sandy | last post by:
I need (okay, I want) to make a dynamic array of my class 'Directory', within my class Directory (Can you already smell disaster?) Each Directory can have subdirectories so I thought to put these...
13
by: Bill Nguyen | last post by:
Is it possible to create your won XSD to use with .NET based on an XML content? For example the one below: <?xml version="1.0"?> <pcats:FuelsDoc...
4
by: Vlad | last post by:
I am having problems using the file.create method within a function that is called when looping through an array of filepaths. If I call my function with a hardcoded file path --C:\Temp.txt the...
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: 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
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.