473,396 Members | 1,864 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.

Change file type in vb / vb.net

jamesd0142
469 256MB
Ok here's one for the experts...

I want to create a text file "test.text" that stores different values on each line.

Is it possible for me to go to the directory its saved and change the extension to test.abc, then when i open it in vb/vb.net is converts the file back to test.text before opening it.

So in english...
I have a file called test.abc, which is technically a notepad file that storing values that i dont want beginers to open. (Dont worry values will be encrypted anyways :))
Then when i read from it needs the extension changed from .abc to .text again before opening it to read the values in vb.

is this possible?

Thanks James
Oct 10 '07 #1
4 5590
jamesd0142
469 256MB
Answer my own question again :)

It is possible
i used this.
FileSystem.Rename("Filename", "Filename2")
Oct 10 '07 #2
Ali Rizwan
925 512MB
Answer my own question again :)

It is possible
i used this.
FileSystem.Rename("Filename", "Filename2")
Hey buddy,

Dont use fso.rename

If you have made test.abc using notepad or you have made this textfile using fso you can open it in vb either file extension is txt or anyone else like jpg, bmp, abc, mon, it can be a sys file or a exe file.
I ll send you a sample but not now after some time because i have to logout now.
But

GOODLUCK
And Wait for the sample unless you ma de it yourself
ALI
Oct 10 '07 #3
jamesd0142
469 256MB
ok cheers for that.

so if i understand... you can read lines from a text file, even tho the extenstion is no longer .text/.txt?

Thanks
Oct 10 '07 #4
Killer42
8,435 Expert 8TB
so if i understand... you can read lines from a text file, even tho the extenstion is no longer .text/.txt?
Correct. The extension is of no significance whatever. It's just to give the user some idea of what to expect, and to determines how Windows treats the file by default.

In other words, if you have a file with a .TXT extension and you just tell Windows to open it, it will start up Notepad (or TextPad, or whatever application you have said TXT files belong to). But you can also tell it to "open with ..." any program you want. In other words, the extension is sort of a "hint" as to who would normally be expected to deal with the file, but this is not enforced.
Oct 11 '07 #5

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

Similar topics

4
by: Werner Kaiser | last post by:
Hi, I want to change the text for the file-browse button within a form: I have something like that: <FORM ENCTYPE="multipart/form-data" ACTION="<?php echo basename(__FILE__)...
1
by: Amir Eshterayeh | last post by:
Dear Friends I need to change the css file of my aspx files dynamically so users can choose their css file names and when page loads, it read css file name from database. I try to use...
4
by: JohnSouth104 | last post by:
Hi I want to warn the user that changing the selected item in a pull-down will clear some data he has already entered in a file download box. I've tried using confirm() to return true or false...
2
by: david | last post by:
When you right click on a file in windows, there is a property of type of file, which seems to associate this file with an application for it. For example, when you double click on a .doc file, the...
2
by: Joel D Kraft | last post by:
I'm using controls in my ASP.NET application from a couple of vendors. Between the vendors and thier versioning, I've set up subfolders under my bin directory: bin bin\Infragistics\v5.2...
3
by: Ubergeek | last post by:
I have a project (Win32 application) that I want to change to a console application. Does anyone know what to edit in which file, to implement the change?
3
by: TomislaW | last post by:
I am sending word document with e-mail from asp.net 2.0 application. I read doc file like this:FileStream fs = System.IO.File.Open(docPath,FileMode.Open,FileAccess.Read,FileShare.Read); Then...
1
by: roshina | last post by:
Hi Iam facing a problem in my project, developing a web site for online shopping in ASP on windows XP using IIS server. All the validations are ok but the new password is not upadated in the data...
27
by: Jon Slaughter | last post by:
Can I modify code that I have included using <?php include("../Index.php"); ?> The Index.php file contains links that need to be modified to work. Index.php is basically an html file uses a...
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: 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: 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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.