Spaces in Filenames

The cluster discusses issues with spaces and other special characters like newlines, colons, and Unicode in filenames across Windows and Unix systems, debating whether software should handle them robustly or users should avoid them to prevent tool failures.

📉 Falling 0.3x DevOps & Infrastructure
3,218
Comments
19
Years Active
5
Top Authors
#647
Topic ID

Activity Over Time

2008
2
2009
28
2010
18
2011
56
2012
90
2013
161
2014
103
2015
114
2016
192
2017
224
2018
229
2019
241
2020
284
2021
438
2022
228
2023
332
2024
300
2025
174
2026
4

Keywords

COM e.g FILE.TXT NAS o.txt PATH LPT O.txt filename.txt i.e filenames spaces filename names file windows characters txt unix folder

Sample Comments

lexicality Dec 6, 2024 View on HN

any software that can't handle spaces in filenames is broken

amelius Apr 3, 2022 View on HN

Doesn't work well in filenames either.

enriquto Jun 5, 2020 View on HN

Nobody is innocent if they have filenames with spaces in their systems! /s

gonvaled Feb 28, 2018 View on HN

Your tools support filenames with tabs? With any unicode char?A real world possibility.

magnio Sep 7, 2025 View on HN

Not exactly computer friendly, since filenames cannot contain ":" on Windows.

explaininjs Oct 14, 2023 View on HN

Does windows not allow spaces or something? Unix variants seem fine with it.

planede Apr 27, 2022 View on HN

Spaces are the lesser evil. Try newlines in file names. Also try having a directory that contains ":" in PATH.

jensnockert Jan 17, 2012 View on HN

I guess it is the classic "You can create files with any name but don't ever try to access it" that happens in Windows with extremely long names.

nightfly Apr 4, 2024 View on HN

Windows Explorer isn't great either. Still can't support names/paths that the windows filesystem can

enriquto Aug 9, 2021 View on HN

the true (and unpopular) solution is to disallow spaces in filenames