Edit: Thank you guys for your insightful answers!
Dandroid ( @dandroid@dandroid.app ) 48•2 years agoI 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.
davefischer ( @davefischer@beehaw.org ) 27•2 years agoIf 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.
CetaceanNeeded ( @CetaceanNeeded@lemmus.org ) English18•2 years agoWelcomeToCamelCaseMyFriend.png
Michal ( @Michal@discuss.tchncs.de ) 8•2 years agoBut then you have to press shift if you want to use the file in Linux terminal…
jrubal1462 ( @jrubal1462@mander.xyz ) 3•2 years ago…But at least it saves you from having to use quotes or escaping out the spaces with \
Michal ( @Michal@discuss.tchncs.de ) 3•2 years agoI’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.
Posts ( @Posts@discuss.tchncs.de ) 1•2 years agoOr make your shell be case-insensitive
RickyRigatoni ( @RickyRigatoni@lemmy.ml ) 1•2 years agoor pressing capslock before and after each uppercase, if you’re one of those people
helpimnotdrowning ( @helpimnotdrowning@lemmy.sdf.org ) 13•2 years agoTLDR; 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)
Can-Utility ( @Can_Utility@beehaw.org ) 1•2 years agoI 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.
stealth_cookies ( @stealth_cookies@lemmy.ca ) 10•2 years agoThat 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.
- socsa ( @socsa@lemmy.ml ) 8•2 years ago
Only if you want my respect
Schnaftator ( @Schnaftator@lemmy.sdfeu.org ) 8•2 years agoWhy underscores? Dashes are easier to type!
charje ( @charje@lemmy.ml ) 5•2 years agoUsing
-
is much nicer. 𝘋𝘪𝘳𝘬 ( @Dirk@lemmy.ml ) 4•2 years agoWindows has issues with leading spaces in certain applications, but no, you don’t need to replace spaces with underscores in general nowadays.
not_amm ( @not_amm@beehaw.org ) 3•2 years agoPersonally, 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.
heartfelthumburger ( @heartfelthumburger@sopuli.xyz ) 3•2 years agoI’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.