what data types are files with no extension (1 Viewer)

the_net_2.0

Banned
Local time
Today, 08:17
Joined
Sep 6, 2010
Messages
812
If I could bother everyone for a moment,

does anyone know if the system-related files in windows are binary or text data? How exactly do you know the difference?

For instance, I can open the 'hosts' file in this directory: C:\windows\System32\drivers\etc , but I have to open it with a text editor otherwise it's unreadable. It does not have a file extension attached to it. Could anyone enlighten me as to why they don't have one?

And if I was to want to know, what data type is it? binary or text perhaps? When you open it in notepad it's text obviously. Thank you!
 

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 13:17
Joined
Jul 9, 2003
Messages
16,245
My guess is that the files do have an extension but you can’t see it because your settings are set up to hide the particular file extension. You can change the settings so that you can view the file extensions.
 

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 13:17
Joined
Jul 9, 2003
Messages
16,245
Ah right...
Well, after answering your question, I went and had a look, and sure enough there is a file without an extension. You learn something every day!

Mine contains:
# Copyright (c) 1993-2006 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host

127.0.0.1 localhost
::1 localhost

Wiki says:
http://en.wikipedia.org/wiki/Hosts_(file)

Extract:
The hosts file is a computer file used in an operating system to map hostnames to IP addresses. The hosts file is a plain-text file and is traditionally named hosts.
 

Vassago

Former Staff Turned AWF Retiree
Local time
Today, 09:17
Joined
Dec 26, 2002
Messages
4,751
Yeah, something really fun to do is remap certain web addresses to others on a friends computer. :D
 

the_net_2.0

Banned
Local time
Today, 08:17
Joined
Sep 6, 2010
Messages
812
Yeah, something really fun to do is remap certain web addresses to others on a friends computer. :D

or add domain names with the local host IP to the end of that particular file so people come and ask you why they can visit some websites but not others. :D

Uncle Gizmo,

Thanks a lot for your input sir. I didn't know there was a Wiki article on it. Heck...there's probably a mil+ pages on there!
 

boblarson

Smeghead
Local time
Today, 06:17
Joined
Jan 12, 2001
Messages
32,059
Just an FYI - any file type can be there with no extension. In fact, you can even rename files to no extension. The only problem with that is that you never know what type of file it might be and opening some in the wrong program can kill them (for example - never open a database file - mdb/accdb in Word).

Of course you can't double-click on them to open as the associated extension is not there, but you can open the program that it goes to and then open it from there (you have to use the All Files dropdown).
 

the_net_2.0

Banned
Local time
Today, 08:17
Joined
Sep 6, 2010
Messages
812
Bob,

Can you stream binary files as text types if you declared it that way in, say, an ADO procedure?
 

Vassago

Former Staff Turned AWF Retiree
Local time
Today, 09:17
Joined
Dec 26, 2002
Messages
4,751
Basically, file extensions are for the full benefit of software to recognize file types. Actual file types are stored within the binary code, so even if you change the file extension, the file type will not change unless the file is modified in another program.
 

Simon_MT

Registered User.
Local time
Today, 13:17
Joined
Feb 26, 2007
Messages
2,177
Isn't the difference between the Apple and PC, the Apple looks at the File Header and determines what type of file it is, Windows needs a White Cane.

Simon
 

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 13:17
Joined
Jul 9, 2003
Messages
16,245
Isn't the difference between the Apple and PC, the Apple looks at the File Header and determines what type of file it is, Windows needs a White Cane.

Simon

It seems to me that the main difference between an Apple and a PC is the user. It appears to me that apple users cannot get over the fact that the PC has won.
 

Vassago

Former Staff Turned AWF Retiree
Local time
Today, 09:17
Joined
Dec 26, 2002
Messages
4,751
It seems to me that the main difference between an Apple and a PC is the user. It appears to me that apple users cannot get over the fact that the PC has won.

I disagree there. I think it's more likely that Apple has gone a different route more recently. They haven't lost.

I've never been an Apple person though. I'm a PC.
 

Simon_MT

Registered User.
Local time
Today, 13:17
Joined
Feb 26, 2007
Messages
2,177
Dam shame that Access is not on the Mac, that is, on the native OS.

Simon
 

the_net_2.0

Banned
Local time
Today, 08:17
Joined
Sep 6, 2010
Messages
812
Isn't the difference between the Apple and PC, the Apple looks at the File Header and determines what type of file it is, Windows needs a White Cane.

Simon
:laugh: Nice.

it begs the question...who is smarter: Gates or Jobs? From a revenue generating standpoint, I would have to say Gates, even today. But definately in the 70's and 80's. I mean, he sold his first package before it was even written...
 

Users who are viewing this thread

Top Bottom