There have been multiple accounts created with the sole purpose of posting advertisement posts or replies containing unsolicited advertising.

Accounts which solely post advertisements, or persistently post them may be terminated.

charje ,

Using - is much nicer.

socsa ,

Only if you want my respect

darcy ,
@darcy@sh.itjust.works avatar

never use spaces. never use special characters like |$&";?*'. avoid non-ascii. case is preference, i personally use kebab-case

stealth_cookies ,

That depends, if you have the fortune (misfortune?) of using the CAD software Creo/ ProE from PTC then spaces are verboten since they haven’t progressed from the days where the software was written for UNIX.

Tug_Boat ,

Damn this just made me realize why I use so many _ in my file names. Used to use PTC shit in a previous job very heavily.

LazaroFilm ,
@LazaroFilm@lemmy.film avatar

Looks at both your screen_names…

stealth_cookies ,

To be fair mine only has an underscore because Lemmy doesn’t support periods in user names. I have actually barely used the software I was talking about and use another one that doesn’t care.

CetaceanNeeded ,

WelcomeToCamelCaseMyFriend.png

Michal ,

But then you have to press shift if you want to use the file in Linux terminal…

jrubal1462 ,

…But at least it saves you from having to use quotes or escaping out the spaces with \

Michal ,

I’d rather use snake_case for file names in Linux that way you don’t have to press shift until the end of the first word, and byt that time you probably have enough characters for tab completion.

RickyRigatoni ,
@RickyRigatoni@lemmy.ml avatar

or pressing capslock before and after each uppercase, if you’re one of those people

Posts ,

Or make your shell be case-insensitive

ElderWendigo ,

ThatIsPascalCase thisIsCamelCase

Jakylla ,
@Jakylla@sh.itjust.works avatar

Also, hasn’t been said yet, but when a file name with a space is uploaded to the net, the url will replace spaces with “%20” (for technical reasons), making the URL looking bad

(but still not mandatory to replace spaces by underscodes)

Example: http://example.com/the%20file%2042.png vs http://example.com/the_file_42.png

nueonetwo ,

Ohhhhhhhhhhh, neat.

Schnaftator ,

Why underscores? Dashes are easier to type!

grabyourmotherskeys ,

Dashes for dates and ids. Underscores for spaces.

ISP-7_compliance_report_2023-08-09.pdf

Tinister ,

You mention dashes but then used hyphens. 😕

grabyourmotherskeys ,

You are technically correct. The best kind of correct.

knexcar ,

Aren’t they the same thing?

peter ,
@peter@feddit.uk avatar

Hyphen - dash — I think, it could be the other way around

stringere ,

Vaginal shied or pinch of spice, but when to use which?

Schnaftator ,

TIL. Alright, then let’s use minus signs!

jsveiga ,

Spaces are not the end of the world, but very annoying:

On a bash command line, they make it harder to handle a list of files returned by a command as argument to another.

On the command line (lin or win), they require escaping or quoting when used as arguments or script/executable names.

On many programs, if you cut&paste the complete path to the file (for example in a network drive), you can click on the path and it will access the file, but spaces in filenames or directories breaks that (and it’s not bad programming, the program simply can’t guess where the link ends).

When you mention the name of the file in a documentation or message, it may lead to misintepretation, and it’s just fugly:

“You can find more information in the attached document file.pdf”.

What is the name of the file? it can be “the attached document file.pdf”, “attached document file.pdf”, “document file.pdf” or “file.pdf”.

Also when mentioned in a text, the file name may end up split in separated lines or even pages, and will more likely be subject to autocorrect.

When copying the file name in a text, in most environments you can double-click to select the whole name, but it doesn’t work if it has spaces.

Now, if you never ever type or copy/paste a file name, and only ever access files through a graphical interface, then it makes no difference.

But then you start getting to comfy and if anything goes, why not non-ascii chars too? And that opens a different can of troubles.

Nioxic ,

Browsers also dont like them!

dandroid ,

I use command line a lot. I hate needing to add backslashes before spaces or put quotes around file names. It’s easier to just use underscores.

not_amm ,

Personally, I try to keep some rules for myself while using a system. I used to use spaces for readability, but then it was kind of hard to remember all the names of my files, so i just went with a conceptual naming. I now use keywords and some classification like numbers or date before the keywords, it has helped me to find files quicker and with less words than before.

YoungPrinceAmmon ,

I know it isn’t, but I’m afraid not to

Wootz ,

I know I don’t have to but it feels dirty

d3Xt3r ,

I still try and stick to the 8.3 convention as far as possible. I don’t like LFNs.

AlternateRoute ,

8.3 is horrible in almost any moderately complex system. We have one at work and you basically need a index / translation document to figure out what the files or scripts do. The Database tables have similar short name limits.

You eventually memorize the ones you use often but it creates a huge new / external parties to understand the system.

davefischer ,
@davefischer@beehaw.org avatar

If you spend a lot of time at the command line, then spaces in filenames are REALLY annoying. If you don’t, it doesn’t matter.

heartfelthumburger ,
@heartfelthumburger@sopuli.xyz avatar

I’d still advise against it if you’re using Windows. A space is interpretered as more than a single character meaning you’ll hit the 255 character limit for paths quicker if you have a large folder structure. I’ve seen this happen many times in my time as a support technician.

VelociCatTurd ,

Just in general? No. But I may still use spaces or camel case sometimes on Linux because it makes it a little faster for me to reference a file without escaping the spaces

tate ,

Camel case is the way. Why use underscore instead of space when you could just,… not?

UlrikHD ,
@UlrikHD@programming.dev avatar

Stockholm syndrome from whatever the convention is for your daily programming language. Long live snake case 🐍

helpimnotdrowning ,
@helpimnotdrowning@lemmy.sdf.org avatar

TLDR; No

It hasn’t been necessary in a long time, unless you’re a developer who frequently needs to type in filenames in everywhere (since the command line needs extra protection against spaces and other symbols)

The OS (Windows, Mac, Android, etc) handles thar all for you so you don’t have to worry about it (unless you happen to use a badly-written program that doesn’t understand spaces, but this is super rare to begin with, and more protected against as time goes on)

jsveiga ,

Even non-developers may hate spaces in filenames, when links to the file you send in a message don’t work because clicking on them uses only up to before the first space.

Can_Utility ,
@Can_Utility@beehaw.org avatar

I maintain a number of Drupal websites as part of my job. Our stakeholders have varying degrees of familiarity with the ins and outs of computing.

A few months ago I got a ticket from one of our stakeholders. Apparently PDF files were broken across large swathes of their site. What happened was Red Hat pushed through an update to apache that closed some security loopholes. As an unexpected side effect, it also meant that any files being served from Drupal’s private file system would break if the files contained spaces in the names. No rewrite rules seemed to fix the issue; we ended up having to go into the rendered HTML and replace all the spaces in the links with ‘+’ signs. They are now told to make sure future files have underscores instead of spaces in the filename.

So yes, in some cases you still need to use _ (or some sort of non-space character) in file names, even today.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • [email protected]
  • random
  • lifeLocal
  • goranko
  • All magazines