Ask Leo! by Leo A. Notenboom

Does a file's name matter?

Search First! Then browse: Categories | Full Archive | By Date | Newsletter

Home » Windows

Summary: Renaming a file is easy, but is it the right thing to do? The answer is yes, but there are guidelines to keep the file easily usable.

If you download a file (say, an update for your video card drivers), and change the name from, say "xxx123.45.exe" to "vidcardupd1", will the program still install/run properly, or does renaming the filename affect the actual program itself?

Changing the filename certainly doesn't change what the file is or does, but doing so it can prevent Windows from knowing what to do with it.

I know I regularly rename downloads.

Let's review some guidelines.

Your example is a good one: renaming an obscure "xxx123.45.exe" to something that's perhaps a little more meaningful like "vidcardupd1" is perfectly safe and will not harm the file in any way.

However, you won't be able to run the file until you rename it again.

The problem is that the name you've chosen no longer has the ".exe" extension. It's that filename extension that tells Windows you have an executable file. Without that extension, if you double-click on the file then Windows won't know what it's supposed to do with it.

You can certainly keep the file with this name but before you can actually use it you'll have to rename it again, adding that ".exe" extension.

"... the filename simply doesn't matter, as long as the extension is set properly."

A more practical approach might be to keep the filename extension from the beginning. For example you might rename "xxx123.45.exe" to "vidcardupd1.exe". Now when you double click on vidcardupd1.exe Windows will know that it's supposed to run it.

But the bottom line is that the filename simply doesn't matter, as long as the extension is set properly.

Now, doesn't that imply that you can rename something to the wrong extension and have it cause problems? Yes, indeed.

For example, if you were to rename "xxx123.45.exe" to "vidcardupd1.jpg" Windows will now think that what you have is a jpeg file - a photograph or other image. When you double click on it Windows will dutifully open up your image viewing or editing program and pass it the filename "vidcardupd1.jpg" to display. Since it's not really a jpeg image, that program will either generate an error or in the worse case, crash as it tries to display what looks to it like garbage.

Related:

Helpful? Get new articles weekly by email in my FREE newsletter!

Your Name:
Your Email:


Why Subscribe?

Article C3174 - October 9, 2007

Recent Comments
2 Comments

This was MY question (I asked Leo this like 3 months ago). COOL!!! At the time, I neglected to add that I would have kept the ".exe" extension anyway, and just change the actual name to something legible. :)

Posted by: Carl R. Goodwin at October 12, 2007 6:29 PM

if you want to play a rmvb file with windows media center (ehshell.exe). you will have to trick ehshell to read it (this will only work if you run real alternative) if you replace .rmvb with or add .avi to the filename ehshell will play the file.

Posted by: Albert at October 12, 2007 8:26 PM

Post a comment on "Does a file's name matter?":






(Email Address will not be published.)

Remember Me?

By popular demand...
my tip jar
Cuppa Joe
Buy Leo a Latte!

(you may use HTML tags for style)

RSS feed Subscribe to the RSS Feed specifically for comments on this article.

Before commenting, please...

  • Read the article at the top of this page. If your comment shows you didn't, it'll be deleted and ignored.

  • Comment only on this article. Use the Google search box at the top of the page if you have a question about something else.

  • Don't include personal information in the comment. No email addresses. No phone numbers. No physical addresses.

  • Don't spam. Excessive links to unrelated sites within a comment or across multiple comments will cause all such comments to be removed.

  • Don't ask me to recover lost passwords or hacked accounts. I can't, and those comments will be deleted.

  • I can't respond to every comment. And I can't vouch for the accuracy of others who do.

Please wait. Your comment is being processed ...


Question? Ask Leo!