5 ms·
putting colons in your filenames are almost as weird as alternate data streams.
by sickbeard 10y ago
putting colons in your filenames are almost as weird as alternate data streams.
- cordite 10y agoIt's not a forward slash or a NUL byte. And it is a printable character. Doesn't seem so wrong to me.
- tamana 10y agoA colon is a forward slash on MacOS
- stevekemp 10y agoSome tools assume particular characters mean things. For example GNU tar will assume if you find ":" in the filename of the archive it's marks a hostname..
- brobinson 10y agoUse --force-local to bypass this issue. I got hit by this recently. :)
- cygx 10y agoIt's used as separator in various places on *nix (eg PATH).
- ygra 10y agoSo are semicolons on Windows, yet still legal in file names. For PATH you can just quote the ones containing the separator (at least on Windows).
- cygx 10y agoTraditionally, there's no way to quote in PATH on *nix. I do not believe that's changed, so if you cannot just change the name, you'd need to use a workaround like creating a colon-free symlink.
- deleted 10y ago[deleted]
- jey 10y agoHow do you feel about file extensions longer than three characters? How about filenames with multiple dots in them?
- Stratoscope 10y agoNot sure what the question is here, can you clarify? Long extensions and multiple dots are perfectly valid in Windows filenames. I use them all the time. They're not like colon which has a special meaning referencing alternate streams.
- soundwave106 10y agoThe funny thing is that in most Windows tools, it doesn't mean even alternate file streams. It simply is flat out illegal (unless used as a drive letter); most tools will reject any program trying to save a file in the format of "filename:ADS". Even in managed code tools, it's this way. For instance, in C#, a statement like this: File.WriteAllText(@"c:\test.txt:teststream", "AFS test"); Will error with "path format is not supported". There's no way to access ADS natively in .NET. The only way to access ADS is to evoke native Win32 methods.
- jey 10y agoThese are things that seem normal to me that a Windows user might also describe as "weird", just like the GP post described colons in filenames.
- 10y ago
- spdionis 10y agoSo I can't name my file "Theory of everything: 42.pdf"?