Technology in terms you understand. Sign up for the Confident Computing newsletter for weekly solutions to make your life easier. Click here and get The Ask Leo! Guide to Staying Safe on the Internet — FREE Edition as my thank you for subscribing!

Does a file's name matter?

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.

Become a Patron of Ask Leo! and go ad-free!

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.

Subscribe to Confident Computing! Tech problem solving & safety tips & a weekly confidence boost in your inbox every week.

I'll see you there!

10 Reasons Your Computer is Slow

Slow Computer?

Speed up with my special report: 10 Reasons Your Computer is Slow, now updated for Windows 10.

NOW: name your own price! You decide how much to pay -- and yes, that means you can get this report completely free if you so choose. Get your copy now!

2 comments on “Does a file's name matter?”

  1. 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. 🙂

    Reply
  2. 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.

    Reply

Leave a reply:

Before commenting please:

  • Read the article.
  • Comment on the article.
  • No personal information.
  • No spam.

Comments violating those rules will be removed. Comments that don't add value will be removed, including off-topic or content-free comments, or comments that look even a little bit like spam. All comments containing links and certain keywords will be moderated before publication.

I want comments to be valuable for everyone, including those who come later and take the time to read.