General Question

lostinyoureyes's avatar

Should file names not have spaces?

Asked by lostinyoureyes (1121points) May 11th, 2010

Whether it be on Mac or PC, is it a good idea to have a hyphen or underscore instead of a space in a filename? I’m talking about Word docs, images, etc. I know it allows the option to have a space when you save a file, but I’m wondering if this causes trouble for future circumstances…

Observing members: 0 Composing members: 0

19 Answers

cfrydj's avatar

I’ve never run into any problems using spaces.

JLeslie's avatar

I use spaces. There are certain symbols you can’t use, but I am not sure off of the top of my head, I just know when I use them the computer does not let me save. It is either a period or slash, not sure; but, it isn’t a big deal, because like I said the computer lets you know it won’t work.

Arp's avatar

I don’t know about you Windows/Mac users, but Linux is somewhat tolerant of spaces in filenames. The only thing is, if you want to use the terminal and used the “cd” command to change to that specific directory, you have to put it in quotes, like so:

cd “my directory”

Instead of if you had just used no space, where it would just be:

cd mydirectory

Since I use the terminal often, I find it more convenient to not use spaces. I use them when they are absolutely needed, like in my music collection.

I mean, name a folder “Sgtpepperslonelyheartsclubband” is just wrong.

WRONG

EDIT: same thing when referencing to files, i just noticed the question was pertaining to files and not directories, but it is pretty much the same dilemma in Linux

njnyjobs's avatar

Space between legal characters is allowed in naming files in Windows and Mac OS’s. However, a space, nor a period for that matter, can not be used at the end of a name.

Also, the following characters are reserved and cannot be used in a file name:
< > : ” / \ | ? *

The use of spaces in a filename has no significant impact of the operation of the system. One instance where a space would better be avoided is in the naming of webpage files as sometimes the spaces allow for a hyper-text link to break at the point of the space thereby leading a browser to a 404 page.

wgallios's avatar

If your on a Linux environment it can be a pain, I always use underscores. so instead of “cd /media/my \new \folder/another \folder” it would be “cd /media/my_new_folder/another_folder”.

But essentially there is nothing “wrong” with it.

iLove's avatar

We use emails for EVERYTHING at work. When files with spaces in the names are emailed to us, they get characters thrown in, and those files have really long names when saved. Unless you rename them, they look funky.

For personal use, files with spaces in the names are no problem. In business for emailing and use on your website, you will get some funky junk especially in your PDF file names.

mrentropy's avatar

I’m with @Arp on this one. Spaces are okay until you start messing with command lines or terminals. And programming, if you have to escape the spaces.

anartist's avatar

Nowadays, filenames with spaces work in many applications for PC and Mac. However, those .spaces actually show up as %20 on unix or linux-based web servers. DON’T%20USE%20SPACES!
dont_use_spaces DontUseSpaces. ‘nuff said.

njnyjobs's avatar

@anartist . . and other non-Mac and non-PC users . . .OP did specifically state Mac and PC OS for this question. . .

InspecterJones's avatar

Everyone is getting way too nerdy on this guy…if he’s asking he isn’t gonna be using terminal or migrating to linux.

Spaces are fine, use em if you wanna.

anartist's avatar

@njnyjobs @InspecterJones @lostinyoureyes I am not talking abnout migration or anything complex—just things like uploading or downloading files or posting on wegb or storing on internet, not totally unlikely things a person with a mac or pc might want to do.

CMaz's avatar

Iwasaneverafanofspaces.

anartist's avatar

@ChazMaz butCapitalsDoHelpClarify.

CMaz's avatar

ThisIsTrue.

mattbrowne's avatar

My native tongue is Unix. Spaces in filenames still look weird too me. I don’t use them when creating files on my Windows systems.

anartist's avatar

@mattbrowne not everyone speaks unix. Still it’s a useful habit for when you run into someone who does.

MaekoPoisoning's avatar

Unless you are creating file names that you wish to use in programs that are space touchy, you should be fine ^.^

Answer this question

Login

or

Join

to answer.

This question is in the General Section. Responses must be helpful and on-topic.

Your answer will be saved while you login or join.

Have a question? Ask Fluther!

What do you know more about?
or
Knowledge Networking @ Fluther