starbitz
02-22-2003, 08:24 PM
How do i open files in VB of unknown types? i'm sure they are not text files coz they can't be open using text editors.
pls help
pls help
Openig files of unknown typestarbitz 02-22-2003, 08:24 PM How do i open files in VB of unknown types? i'm sure they are not text files coz they can't be open using text editors. pls help dragnut 02-22-2003, 08:41 PM Whats the extension for these files? Maybe they are something easily recognizable to someone here. Shawn starbitz 02-22-2003, 08:48 PM Actually, i'm trying to read the files generated by a magnetic tape reader. and the files it generates have extensions .001, .002, .003 depending on the number of files. for example, if it generates three files upon reading the magnetic tape, it generates the file xxxxx.001, xxxxx.002 and xxxxx.003. Now, what i want to do is to read the files it generated. obviously they are not text file coz text editors wont work. thanks starbitz 02-24-2003, 04:57 PM calling all VB experts :) hope you can help me on this :) phinds 02-24-2003, 06:29 PM you have not given anyone a clue what it is that you want to do. If you want to just look at the contents of such files, find a good binary editor. If you want to open the files with VB code, just open them as binary files. In any case, if you don't know the format of the files, then you are SOL starbitz 02-24-2003, 06:42 PM all i want to do is extract the data of the magnetic tape, and i'm doing one thing at a time, that is, first opening the file generated by the tape reader. how do you open the file as binary and decode the file so that i can read what is in it? sorry, i have idea on opening binary files and would appreciate if you could help me on this :) thanks, phinds 02-24-2003, 07:57 PM look up "open" in the on-line help. Well, actually, I can be a little more help than that. If you get the "sandbox" project at the link below my name, there is a whole section on files (without using FSO). You'll have to adapt it to do binary files since it is for text files. ayoung 02-24-2003, 08:48 PM the program that records it should be able to open it, also try like winrar. starbitz 02-25-2003, 02:32 AM my mistake, i mean i have NO idea in opening binary files, thanks to all your help, i'll those at home :chuckle: JordanChris 02-25-2003, 07:27 AM Rapid reading of a file: Dim sData as String Open "c:\temp\myFile.TXT" for Binary Access Read as #1 sData = Space$(lof(1)) Get #1, , sData loquin 02-25-2003, 08:37 AM Although, for a binary file, sData should probably be an array of bytes Rapid reading of a file: Dim bytData() As Byte Open "c:\temp\myFile.TXT" For Binary Access Read As #1 redim bytData (lof(1)) Get #1, , bytData Close #1 |
EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum