text file saved in COM format..

  • Thread starter Thread starter mistral
  • Start date Start date
M

mistral

Just saved text data from email, in text formt, and specified file name
like "website.com", then found it was saved as ms-doc COM application,
with program icom, in my desktop. I tried run it and got error,
something like "illegal operation.. Can this .COM file damage something?
 
COM and EXE extensions are reserved executable formats and cannot
be used for TXT documents. It could put your PC in the trash bin.
Save the documents with a txt or doc extension.
 
(e-mail address removed),
mistral said:
Just saved text data from email, in text formt, and
specified file name like "website.com", then found it was
saved as ms-doc COM application, with program icom, in my
desktop. I tried run it and got error, something like
"illegal operation.. Can this .COM file damage something?

If you want to retain the .com portion of the file name, try
saving the file as website.com.txt. You can also go to Control
Panel -> Folder Options -> View tab and put a check mark back
in the box next to "Hide file extensions of known file types".
That will allow you to save the file as "website.com" since it
will automatically retain the .txt file format.

Good luck

Nepatsfan
 
mistral said:
Just saved text data from email, in text formt, and specified file name
like "website.com", then found it was saved as ms-doc COM application,
with program icom, in my desktop. I tried run it and got error,
something like "illegal operation.. Can this .COM file damage something?

only if the person writing it *****really****** knew a hell of a lot of
what they were doing and they have to be really trying to make it
damage something!!!


you obviously either never used the internet , or never used a .com
file. I imagine the latter in your case.

a website .com has nothing to do with a .com file.

a website .com is not a file any more than .co.uk website is.

I do recall somebody saying 10 years ago, when he first saw the
internet.
Why does the internet use .com when it's so old fashioned, and .exe
repalced .com already!! Although he did ask if they were really .com
files, and he hadn't ever used the internet. So he wasn't *that* silly!

I hope you understand that you're supposed to save the text file as
..html or .htm
The .com is part of the domain name used to refer to the computer
you're accessing through the web. The web page file will be .html or
..htm . Maybe php if that's considered a webpage, i'm nots ure if it
is.. Buit don't confuse a webpage (like, html file), with a .com
file. A .com is like an exe
 
Byte said:
COM and EXE extensions are reserved executable formats and cannot
be used for TXT documents. It could put your PC in the trash bin.
Save the documents with a txt or doc extension.
--


or if it's an html web page, then .html/.htm


I second what you've said,.

I can't believe that so far 2 posters in this thread have gone along
with him calling this file .com !!! **maybe** it'd make sense to call
a directory .com(many offline browsers do- which is fine, it shouldn't
be confused with a file) But don't call a web page file a .com !!
 
mistral:
Just saved text data from email, in text formt, and specified file name
like "website.com", then found it was saved as ms-doc COM application,
with program icom, in my desktop. I tried run it and got error,
something like "illegal operation.. Can this .COM file damage
something?

Just change the attributes of the file!
 
(e-mail address removed) пиÑал(а):
only if the person writing it *****really****** knew a hell of a lot of
what they were doing and they have to be really trying to make it
damage something!!!


you obviously either never used the internet , or never used a .com
file. I imagine the latter in your case.

a website .com has nothing to do with a .com file.

a website .com is not a file any more than .co.uk website is.

I do recall somebody saying 10 years ago, when he first saw the
internet.
Why does the internet use .com when it's so old fashioned, and .exe
repalced .com already!! Although he did ask if they were really .com
files, and he hadn't ever used the internet. So he wasn't *that* silly!

I hope you understand that you're supposed to save the text file as
.html or .htm
The .com is part of the domain name used to refer to the computer
you're accessing through the web. The web page file will be .html or
.htm . Maybe php if that's considered a webpage, i'm nots ure if it
is.. Buit don't confuse a webpage (like, html file), with a .com
file. A .com is like an exe

----------------
it seems, I have described my issue not clear enough.. I just checked
my Recycler for this file: its called "awardspace.txt" and have type
"MS-DOS Application" size 4kb..
I am sure at 100% this text file I tried to save, I just copied and
pasted content(from email) into notepad, then click save, and this text
File name was awardspace.com in Save as dialogue(it was assigned
automatically by system), and "File type" - text.. Dont know why system
save this text file in COM format.. Most definitely this some microsoft
bugs, etc..
Originally the question was: can the opening such "wrong" file damage
something?
 
or if it's an html web page, then .html/.htm


I second what you've said,.

I can't believe that so far 2 posters in this thread have gone along
with him calling this file .com !!! **maybe** it'd make sense to call
a directory .com(many offline browsers do- which is fine, it shouldn't
be confused with a file) But don't call a web page file a .com !!

It's because COM executables aren't seen much anymore. They can only be 64KB
in size or smaller and are/were created in the old days by writing assembly
language. Today Windoze executables are so much larger and written in
higher level program languages than assembly. But Windoze still recognizes
the COM extention as an executable file and hence the OP's "problem". :-)

A more sophisticated operating system won't bother doing file associations
based on file extension names, but rather will use permission bits to
designate whether a file is executable or not. But, Windoze XP isn't that
sophisticated and carries around within it alot of old DOS baggage.

Cheers.
 
NoStop said:
It's because COM executables aren't seen much anymore. They can only be 64KB
in size or smaller and are/were created in the old days by writing assembly
language. Today Windoze executables are so much larger and written in
higher level program languages than assembly. But Windoze still recognizes
the COM extention as an executable file and hence the OP's "problem". :-)

A more sophisticated operating system won't bother doing file associations
based on file extension names, but rather will use permission bits to
designate whether a file is executable or not. But, Windoze XP isn't that
sophisticated and carries around within it alot of old DOS baggage.

Cheers.

Err, which OS is sophisticated and which is primitive?


Hidden files
What about more sophisticated operating systems using attributes to
make a file 'hidden'. Whereas a primitive operating system might use
the filename itself to indicate that.

Of course it's not suprising that linux doesn't include 'hidden' as an
attribute.. You'd have to know 0-15 in binary, along with 4 column
headings rwx and h !!


Globbing / *
Reasonably sophisticated operating systems also distinguish well
between files and directories. Very easy for the command that lists
them, to list either just files, or just directories. Just hidden
files. Just hidden directories. And even offer a consistent expansion
of *(globbing).

Consistent expansion of * (globbing) (in linux, it's such a mess
amongst shells, whether it'll expand those beginning with . that it's
best only to use * interactively, i.e. not in a script.

There's also the issue with . and .. and recursive commands. (I delete
this directory, which includes . and .. so it'll delete .. how?
well, it includes . and .. oh so i'll be deleting the parent then over
and over again until err, until all disks are wiped? We don't want
any of that to happen, so better that the command be inconsistent to
prevent it! Be recursive, but not with ..) Well, as long as the user
knows what's going on.

Scripting
They say, but the Bash (the standard interpreter for scripts in *nix)
is so powerful!! Well, QBASIC for DOS was more powerful. Try
writing a game in Bash.
Though i'm not sure if QB lives in NT anymore, so that criticism is
only half fair.

Multi-user
For somebody running his own computer, the whole multiuser attributes
thing is a hassle.. Too much information. In NT, I can use DOS
commands without care as to other peoples's read/write attributes..
It's my own machine anyway!! I don't have other people using it.



Nevertheless, I shall keep playing with the linux command line, since
I am technically inclined, and I do have some time on my hands!

And linux users keep insisting that I will see the light.

So I will dig deeper and broader.

Considering what i've described, as linux annoyances. I'd say windows
annoyances are better documented, thanks to the thousands of people
complaining on usenet! With windows, the annoyances is usually found
and solved immediately! And if that fails - then reinstall the OS. And
that works!!

I wont' try the linux GUIs (I mean 'window managers'). I know if I did
i'd get so mad I could write a book critiquing them!
 
mistral said:
(e-mail address removed) пиÑал(а):


----------------
it seems, I have described my issue not clear enough.. I just checked
my Recycler for this file: its called "awardspace.txt" and have type
"MS-DOS Application" size 4kb..
I am sure at 100% this text file I tried to save, I just copied and
pasted content(from email) into notepad, then click save, and this text
File name was awardspace.com in Save as dialogue(it was assigned
automatically by system), and "File type" - text.. Dont know why system
save this text file in COM format.. Most definitely this some microsoft
bugs, etc..

See the last paragraph I wrote.. That is the most important!


Well, I can think of 2 possibilities to consider.. But consider neither


- windows has associated txt with being executable.. That is very
fishy, I don't think that's a standard option.. Maybe if your computer
was compromised that might happen to fool you into running a malicious
executable file by making you think it's a txt file you are opening.
- it was saved as .txt.com or .com.txt or something like that.. Also
very fishy.


It's harmless if the contents of the txt file is Text . It's only
dangerous if the contents is not text, and you double clicked it, which
caused it to run rather than opening in notepad.

If the contents is text, then it's suspicious but not dangerous. Which
is strange., but of course, harmless.

It's not an important file, may as well delete it.

By the way.. What you've said doesn't match up to testing. How did you
causae notepad to suggest a filename automatically?
Try saving any file in notepad, it never suggests a filename
Originally the question was: can the opening such "wrong" file damage
something?

no it won't. As I said, you'd have to be a dying breed of computer
whiz to make it do damage - If you wrote it. If it were to do damage,
the contents wouldn't look like any human language. It'd be a string of
ascii characters that don't conform to any human language.. Not just
any string either.


Worst case scenario, it's not text in there, it's dangerous, you ran
it, it was a trojan, or virus. That's another story!
But to test if it was dangerous to run. Drag the file into notepad (Do
not double click it)
Then look at the contents. and you'll see if it is dangerous to run by
whether it is humanly readable text or suspiciously unreadable text and
other characters.
 
Err, which OS is sophisticated and which is primitive?


Hidden files
What about more sophisticated operating systems using attributes to
make a file 'hidden'. Whereas a primitive operating system might use
the filename itself to indicate that.
Sure is alot simpler to start a filename with a dot to hide it rather than
to have to go and change its attributes. That I'd call "sophisticated".
Of course it's not suprising that linux doesn't include 'hidden' as an
attribute.. You'd have to know 0-15 in binary, along with 4 column
headings rwx and h !!
Why should it when its so much simpler to just "dot" it?
Globbing / *
Reasonably sophisticated operating systems also distinguish well
between files and directories. Very easy for the command that lists
them, to list either just files, or just directories.


ls -dl */

Just hidden
files. Just hidden directories.

ls -dl .*/

Scripting
They say, but the Bash (the standard interpreter for scripts in *nix)
is so powerful!! Well, QBASIC for DOS was more powerful. Try
writing a game in Bash.

QBASIC was a interpreted "programming language". On the Linux side you have
many that are far more powerful, such as python or perl ... and there are
many more.
Though i'm not sure if QB lives in NT anymore, so that criticism is
only half fair.

Multi-user
For somebody running his own computer, the whole multiuser attributes
thing is a hassle.. Too much information.

Maybe a bit of a hassle for the newbie, but that's what keeps the user space
separate from the kernel space AND keeps one user space separate from
another user space. A sophisticated operating system has these builtin safe
guards for security purposes. Malicious code run by one user can't impact
on the o/s (kernel space) nor on other user's data/files. The lack of this
in Windoze is what makes viruses and trojans so destructive on
that "operating system".
In NT, I can use DOS
commands without care as to other peoples's read/write attributes..

As can any malware you download and run. :-)
It's my own machine anyway!! I don't have other people using it.
There's more to a multiuser o/s than just the human user. There are
other "users" associated with different things that also are protected by
file permissions. Think of a user named "apache" and you'll get my drift.
Nevertheless, I shall keep playing with the linux command line, since
I am technically inclined, and I do have some time on my hands!
I'm sure that the more you play the more you'll come to appreciate its power
and usefulness.
And linux users keep insisting that I will see the light.
You will. :-) When the light bulb finally comes on, you'll see the light.
So I will dig deeper and broader.

Considering what i've described, as linux annoyances. I'd say windows
annoyances are better documented, thanks to the thousands of people
complaining on usenet! With windows, the annoyances is usually found
and solved immediately! And if that fails - then reinstall the OS. And
that works!!
HAHA, right. Nothing like having to reinstall the OS because something has
gone bad. Sure makes keeping ones configurations, data and installed apps
fun to redo and redo and redo.
I wont' try the linux GUIs (I mean 'window managers'). I know if I did
i'd get so mad I could write a book critiquing them!

I was a KDE user for a long time and just didn't appreciate Gnome until I
started using it with Ubuntu. I must say, I'm impressed! As for eye-candy
it's pretty hard to beat E17. That's truly impressive.

Have fun!
Cheers.

--
Linux is ready for the desktop! More ready than Windoze XP.
http://tinyurl.com/ldm9d

You just can't play games on Linux!
http://tinyurl.com/kgszl
 
I don't know if this will get posted twice. If it does, it's the same
Sure is alot simpler to start a filename with a dot to hide it rather than
to have to go and change its attributes. That I'd call "sophisticated".

Why should it when its so much simpler to just "dot" it?

Because

How can you then display hidden files, not hidden directories?

and excluding . and .. ?

In DOS or the command prompt, you can display files with particular
attributes, very easily. dir /a-dh (all that are not directories,
and are hidden).
Also, it works for other attributes, like 'read only'.

ls -dl */

I know that one for just directories. But for teh ake of consistency,
surely ls should be able to do just files - not directories.

ls *[^/] <-- doesn't work (why?!) And the alternatives i've seen aren't
so pretty!

Something so simple should be possible elegently with ls, rather than
with a long find command, or by stringing ls together with grep.

A DOS user doesn't have to string dir together with find , in order to
list files (non-directories)!

Something so trivial should have an elegant solution! Or perhaps
elegant is the wrong word.
A low keystroke solution And with only the directory listing command.
It should be a basic function of it.
ls -dl .*/

There the same issue as before. How about just non directories.

But further-
How about excluding . and .. ? I want just files, or just directories.
just hidden files, just hidden directories. I don't want those . and
... entries.

If could give a reason, but it's only 90% researched, I may have
overlooked something. Or I may be correct, but for slightly idffferent
reasons.. I'd rather be able to exclude . and ..
here one is.. But it's long, and with my lack of experience in linux
batch scripting, maybe I overlooked something, and don't want it to
geti n the way of the post!

Here is my reason
DOS doesn't have recursive commands, and it doesn't expand * like linux
does. In DOS you can't do echo * i.e. dir * or *.* doesn't become dir
.. .. a b c Therefore, . and .. never cause such problematic thought.
The .. is just useful for moving back directories.
Linux is different, ls *, if * expands to . and .. (and from my
preliminary investigations .* always does, at least in bash) , so it
will include ls . and ls .. So linux bullies me with that default. .
Fair enough, but give me a setting to turn that setting off, if linux
claims to be so flexible, it should let me! By the way, dir
understand you may want just the files or directories and not the . and
..., and dir /b wil exclude them, and given the way * or *.* works in
DOS, you can do dir *.* /b and it won't include . and .. Thisi s
useful, if you need those results and don't want . and .. processed.
Consider-
how many hidden files or directories do I have..
ls -l .* | wc -l
But if I want to exclude the . and .. entries. I can't from ls. So I
must subtract 2 from the result. That's not so many more keystrokes
than necessary, it's a hack, it's a little bit ugly for something so
simple, and it's functionality that should be within ls.

You see it'd be nice if linux was flexibility enough to give at least
the elegance that DOS offers... There's no reason why linux shouldn't
in this case. I'm not asking linux to be DOS, but i see that linux has
its own ways of doing things. But in this comparison of ls and dir, the
demand I make, is not asking linux to not be linux. On the contrary! If
linux could do what I suggest, it'd be good linux philosophy!








But in linux, it often makes more sense to
QBASIC was a interpreted "programming language". On the Linux side you have
many that are far more powerful, such as python or perl ... and there are
many more.

Well, python and perl exist as windows ports too.

So at best we're even here. I don't have such an issue here ..and
nowadays people aren't using QB with win xp.

Qbasic fitted well with DOS. Came with it. It wasn't like a 3rd party
thing. And it was so easy.

I wouldn't say that python and perl are part of linux or windows or
dos. But QBASIC is very much part of DOS.

They say Linux is just a kernel, so really we should speak of
Linux/GNU. But then you've got a whole ton of software to wade through.
I imagine that people gradually discovered python or perl, soon after
it came out, by word of mouth, by being in the business, or by having
internet access in the early 90s and reading about it.
Everybody with DOS that was into DOS had and knew QBASIC. Any 12 year
old, that didn't have the benefit of internet access or being in the
profession, or knowing anybody else that liked computers.. He could go
far into DOS with dir *.exe dir *.com, help <Enter>
he'd find qbasic.

Maybe a bit of a hassle for the newbie, but that's what keeps the user space
separate from the kernel space AND keeps one user space separate from
another user space. A sophisticated operating system has these builtin safe
guards for security purposes. Malicious code run by one user can't impact
on the o/s (kernel space) nor on other user's data/files. The lack of this
in Windoze is what makes viruses and trojans so destructive on
that "operating system".

this is a very sad state of affairs nowadays

Back in the days of DOS,
-
there was no problem of browser hijacking.. I first ran into that in
2003.
I didn't have internet access at the time I was using just DOS.. We
ran into viruses, usually from a friend's floppy disk (where on earth
knows had that been?).
It seemed that there weren't new viruses coming out all the time. We
had the Anti-virus, MSAV to get rid of them, and VSAFE. These were
really good. And at that time, they were fine. The viruses didn't tend
to format or wipe partitions. They just attacked EXEs and COMs.

And it was adequate.. It's possible to have so much security as to make
a system uncomfortable to use.

DOS didn't need its whole OS redesigned to deal with such a small
threat that its technical users could deal with themselves.


Regarding nowadays though.
-
Most *technically minded* Windows XP users can browse aroudn as
Administrator. And simply by not using 'internet explorer' and not
running dangerous programs, they are safe.
I don't need many user accounts in my windows xp system.
Many people working in the security world, may still work as
Administrator. And do so safely, and have done for years , without
problems.

I can see the attributes of a file from a command prompt, without the
irrelevance of seeing what premissions other users may have.. I don't
even care how that works. Because I am the only user of my system.. If
somebody else uses my computer, it's rare, and i'll watch them like a
hawk.. Not because they want to read my files - they don't. But because
they don't know what they're doing. If they knew what they were
doing, they'd want their own computer. I don't really need to
inconvenience myself with such security concerns which really don't
apply in my nice environment. It is a LUXURY to be able to do this.
If I am running a server and a firewall, and somebody breaks in, then
congratulations to them if they're that good. And if they're that
good, then even if I was running in a limited account, i'd bet they
could escalate to Administrative. Maybe install a key logger.
It's my home machine. Should I inconvenience myself making things take
so much longer, making the OS far nastier to use, all in the hope that
somebody as smart or 20* smarter than me can't break in? You draw a
balance between comfort and security.

Windows XP is fantastic like that!! It has the Administrative account,
and limited accoutns. You can put an ignoramus on a limited account.
But you can run on an Administrative account. Any commands you run
from DOS related to dir, or file attributes (attrib), do note tell you
anything about what permissions they haveo n your files.. Nice and
simple. And secure. Though as I said.. I rarely have other people
using my computer. If they are, they are ignoramuses + I watch them
like a hawk. This happens for 5 minutes a month. Not much of an
inconvenience.




As can any malware you download and run. :-)

There's more to a multiuser o/s than just the human user. There are
other "users" associated with different things that also are protected by
file permissions. Think of a user named "apache" and you'll get my drift.

i'm new to linux.. though i did once set up an apache server. I set
'other' to r. and didn't put executable access to the directory.
Anybody logging in should have the same permissions. If they can log
in. That was fine.

I don't really have the experience in linux to answer that one
properly. However, regarding windows, .. and windows was fine like
this!

I've set up web servers and ftp servers in windows with 3rd party
apps.. Tiny apps, they didn't create any new OS users at all. the http
serevr is read only of course. And the FTP server let me choose which
users have which permissions. The users I think were within the ftp
server, not users of the OS - if that's what linux would do i don't
know.. It was very simple. Setting up those servers had absolutely
nothing whatsoever to do with multiuser abilities in the OS.

So if windows does it fine without making a web server user for that
3rd party web server, or involving itself in such multiuser issues I
don't see why linux has to do anything of the sort. It has nothing to
do with multiuser.. at least not in windows. And that was fine for me..
Simple and made sense.
I'm sure that the more you play the more you'll come to appreciate its power
and usefulness.

You will. :-) When the light bulb finally comes on, you'll see the light.

HAHA, right. Nothing like having to reinstall the OS because something has
gone bad. Sure makes keeping ones configurations, data and installed apps
fun to redo and redo and redo.


I was a KDE user for a long time and just didn't appreciate Gnome until I
started using it with Ubuntu. I must say, I'm impressed! As for eye-candy
it's pretty hard to beat E17. That's truly impressive.

I don't want eye candy!!! Maybe this is why linux GUIs are so bad!!
THey think window is successful because it's all eye candy.
somebody in an ms newsgroup, (maybe you), posted a youtube clip of a
3D linux desktop.. I was already put off trying a Linux GUI . But
tat one made me laugh. The last time that happened was picking up the
Linux Osbourne book, you might've seen the great big osbourne linux
reference.. it had a picture about linux being the future.. saying ..
well.. i won't ruin it.. if I had a working scanner i'd scan it in. It
was priceless. The funniest part was the linux fanatic wasn't kidding!
One day i'll posta reply to you with the picture.. I don't mind
looking at clips of pictures of linux GUIs. Especialyl recommended
ones. They are funny. It's using them that causes a lump in my throat!
Last time I tried a linux GUI I had a lot of work to do and the GUI
kept sliding off the screen. I can't remember what GUI it was, anyhow,
that was in 2002, I am still recovering. If that was a vid clip it'd
have been hilarious. I know, I know, "they've improved".. ;-) I bet
tthey said that in 2002. I'll wait a few more bundles of years before
I try another GUI. I'm more serious about the command line.






..
 
(e-mail address removed) пиÑал(а):
See the last paragraph I wrote.. That is the most important!


Well, I can think of 2 possibilities to consider.. But consider neither


- windows has associated txt with being executable.. That is very
fishy, I don't think that's a standard option.. Maybe if your computer
was compromised that might happen to fool you into running a malicious
executable file by making you think it's a txt file you are opening.
- it was saved as .txt.com or .com.txt or something like that.. Also
very fishy.


It's harmless if the contents of the txt file is Text . It's only
dangerous if the contents is not text, and you double clicked it, which
caused it to run rather than opening in notepad.

If the contents is text, then it's suspicious but not dangerous. Which
is strange., but of course, harmless.

It's not an important file, may as well delete it.

By the way.. What you've said doesn't match up to testing. How did you
causae notepad to suggest a filename automatically?
Try saving any file in notepad, it never suggests a filename


no it won't. As I said, you'd have to be a dying breed of computer
whiz to make it do damage - If you wrote it. If it were to do damage,
the contents wouldn't look like any human language. It'd be a string of
ascii characters that don't conform to any human language.. Not just
any string either.


Worst case scenario, it's not text in there, it's dangerous, you ran
it, it was a trojan, or virus. That's another story!
But to test if it was dangerous to run. Drag the file into notepad (Do
not double click it)
Then look at the contents. and you'll see if it is dangerous to run by
whether it is humanly readable text or suspiciously unreadable text and
other characters.
---------

to be more precisely, I typed the file name as 'website.com'..
Just tried to repeat this on win 98, and got the same result: to save
text in notepad, I typed file name as 'website.com', then "Save as
type": "Text Documents"(default).. The file was saved as COM file,
MS-DOS application, in spite of my file type selection.
 
mistral said:
(e-mail address removed) пиÑал(а):

i'm sure you mean double quotes. single quote give an error message, it
won't even save.
Just tried to repeat this on win 98, and got the same result: to save
text in notepad, I typed file name as 'website.com', then "Save as
type": "Text Documents"(default).. The file was saved as COM file,
MS-DOS application, in spite of my file type selection.

If you wanted the correct results , you shouldn't have put the filename
in (double) quotes. You shouldn't have used quotes at all.

This is how it works..


If you put the filename (the whole thing) in double quotes , then it
won't append any extension to the end of it. (if you don't put quotes,
it saves it with whatever extension is written in 'save as type:..'

Most people will not use quotes.. it's not intuitive either.. So they
get this behaviour..
So if you call a file myfileIwrote with no quotes, it'll
automatically stick .txt on the end. Now, once .txt is on te end, that
is what identifies it as a txt file.
That is useful..


Suppose you want to save a file as blah.html So you do
file..saveas, and notepad has automatically said "save as txt" well,
you can't be bothered to change that to 'all files' so it won't put an
extension on the end..
If you just typed
blah.html and clicked save, then it's save it as blah.html.txt You
don't want that!
so you type "blah.html" and even though it says "saveas type txt" it
won't put .txt after it. So it functions as if it said type:all files.
It ignores whatever the 'saveas type ' is.

"Save As Type" only ever has to do with what extension is appended to
the filename (it only has an effect if you don't put the thing in
quotes, which people usually don't).
Altenatively if you choose 'save as type: all files' then it won't put
an extensino on it.

it's there to make things easier. It doesn't directly determine the
type of the file. Though it can effect it. The extension of the file
determines it.
 
mistral пиÑал(а):
(e-mail address removed) пиÑал(а):

---------

to be more precisely, I typed the file name as 'website.com'..
Just tried to repeat this on win 98, and got the same result: to save
text in notepad, I typed file name as 'website.com', then "Save as
type": "Text Documents"(default).. The file was saved as COM file,
MS-DOS application, in spite of my file type selection.
 
mistral said:
mistral пиÑал(а):


Indeed, you're right,, I just tried in win xp and got the same result
as you describe.

if you save a file, c:\gad.html, or c:\gad.java or c:\gad.abc, "Save As
text" then it puts .txt after it.
Meaning, almost any extension, it does that.

However, it appears there are exceptions, and you found some!

If you save a file, c:\gad.com "Save As text" then it won't append txt
onto it.
I tried for, c:\gad.exe, c:\gad.bat, c:\gad.com all didn't append txt
on the end.

So, windows has that rule for executable files..

For what reason?

I have no idea.. so now the post will get a bit fluffy. I hope what is
written above this sentence is useful though ;-)

one possible reason is that a user writing a batch file (.bat) may not
know about putting a file in quotation marks. Or they may not know to
choose "saveas all files" . In which case they may find it very
annoying, saving their bat file and then seeing it is .bat.txt and then
remaming it to .bat They would also have to be aware of the other
win xp annoyance, go to tools..folder options..view and uncheck "hide
extensions"
That's not a good reason, because a techie user will find out
eventually- if they insist on using notepad. Better to have
consistency.

Another possible reason is that malicious users may name a file
..txt.com
Notepad may do it the other way, .com.txt, but that may give a
malicious user the idea of doing .txt.com to an ignorant enemy!
Also, .com.txt or .bat.txt looks suspiciously like .txt.bat which
look suspicious. So MS don't want to create a climate of fear for the
wrong reasons!

i.e. no good reason!!

The reason why .txt.exe or .txt.bat e.t.c is potentially
dangerous(dangerous to a user that doesn't know better), is because
windows xp by default, hides extensions, the last 3. So, an
executable file, like blah.txt.exe will appear as blah.txt It
will have a picture of msdos application, but an ignorant user may just
see the .txt and think it is ok. Or perhaps a malicious person might
change the picture to the txt file picture as well.
Usually if you see .txt.exe then it's suspicious. 'cos even if you do
know it's potentially dangerous, there is a question as to how it got
there. I reckon email attachments may have a name like that. Malicious
software needn't fool you into clicking something. Once it is installed
it doesn't need you to click something.

It is usually recommended by techies, to uncheck the "hide extensions"
option - amongst other options that amended as checked or unchecked.
generally, the things that say Show, or Display you want checked. And
the things that say Hide, you want unchecked. If you're a techie!

I also notice that when I go to tools..folder options..view.. and
change something like "hide extensions" or anything, and clicked ok
then it refreshes the internet explorer screen and I lose everything I
typed..!! After the 3rd time I realised it wasn't just my bad memeory..
!
 
(e-mail address removed) wrote:

Consider-
how many hidden files or directories do I have..
ls -l .* | wc -l
But if I want to exclude the . and .. entries. I can't from ls. So I
must subtract 2 from the result.

No you mustn't. Just adjust the parameters to not include . and .. entries:

ls -l .?*

Or just get the count:

ls -l .?* | wc -l

Cheers.



--
Linux is ready for the desktop! More ready than Windoze XP.
http://tinyurl.com/ldm9d

You just can't play games on Linux!
http://tinyurl.com/kgszl
 
Back
Top