Live data from Hacker News

I'm “still afraid to use spaces in file names” years old

twitter.com

811–817 of 817 posts

Re: I'm “still afraid to use spaces in file names” years old

#811
post #729

Earlier quoted context omitted.

There's a server at work that name with a non-ascii character. I've run into compatibility issues lots of times where I can't connect. I prefer to just use English with ASCII and be happy

Server names are different. They are by and large machine-facing identifiers, whereas filenames have a 50-50 split of whether they are machine-facing, human-facing, or both. They makes their support of Unicode a much more critical (and appealing) proposition.

everything is a file

Re: I'm “still afraid to use spaces in file names” years old

#812

My username has been my name which has an accented character and has broken countless Windows apps every year since forever, so I just keep a C:/Programs folder where I run stuff. You should never not fear filenames.

I use c:\programs too, but for different reasons. C:\Programs is for portable applications that don't get installed, can be directly overwritten, and consist of at most two files with relevant names. As a bonus, I can run such programs directly from the run menu. C:\Programs\procexp for Process Explorer, for example.

Re: I'm “still afraid to use spaces in file names” years old

#813

Let me tell you how much of a pain in the ass that my employer forces spaces in the corporate OneDrive directory. PS-Microsoft is horrible about stupidly named folders being created and dumped in there.

Depending on the specific issue, the `subst` command may help you. If the OneDrive folder itself has a space in the path, or a necessary subfolder does, you can give that folder a drive letter instead.

Re: I'm “still afraid to use spaces in file names” years old

#814

Earlier quoted context omitted.

Too many characters on Linux? Quite difficult to reach to be fair. Do you have an example?

I have been trying to repro with a small nodejs server but either the server cut off the content-disposition filename or firefox truncates it. When I get that in the wild I'll post an update. In the meantime: $ touch 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111…

But it's _per file name_. The path could be waaay longer than Windows' one

Re: I'm “still afraid to use spaces in file names” years old

#815

Earlier quoted context omitted.

I have been trying to repro with a small nodejs server but either the server cut off the content-disposition filename or firefox truncates it. When I get that in the wild I'll post an update. In the meantime: $ touch 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111…

But it's _per file name_. The path could be waaay longer than Windows' one

Ah, my bad. I thought we were still talking filenames, not paths.

Re: I'm “still afraid to use spaces in file names” years old

#816
post #472
post #411

I have an overly-aggressive function in my .bashrc to rename all files in the current directory: # Rename all files in a directory rn() { rename "s/ /-/g" * rename "s/_/-/g" * rename "s/–/-/g" * rename "s/://g" * rename "s/\(//g" * rename "s/\)//g" * rename "s/\[//g" * rename "s/\]//g" * rename 's/"//g' * rename "s/'//g" * rename "s/,//g" * rename "y/A-Z/a-z/" * rename "s/---/--/g" * rename "s/-‎--/--/g" * } I use th…

Word of warning from hard experience: rn is a really dangerous thing to name a function because it is one char away from rm.

Agree. Having this function exit if any arguments are passed to it seems like a good safety measure.

Re: I'm “still afraid to use spaces in file names” years old

#817

Earlier quoted context omitted.

But it's _per file name_. The path could be waaay longer than Windows' one

Ah, my bad. I thought we were still talking filenames, not paths.

Probably my mistake. You only discussed about file names and I threw in the path thing :)
Post reply on HN