If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Rate Thread | Display Modes |
#151
|
|||
|
|||
Can a Macintosh person tell us how to change the name of a file?
"Wolffan" wrote
| There was a problem where Windows had a max | path of 255 characters, later 260 characters, but Microsoft was pulled | trickery and there's a path length maximum of 32,767 characters which can | be extended if you really, really, REALLY want to go to a lot of trouble. "Starting in Windows 10, version 1607, MAX_PATH limitations have been removed from common Win32 file and directory functions. However, you must opt-in to the new behavior." https://msdn.microsoft.com/en-us/lib...=vs.85%29.aspx For compatibility, MAX_PATH should still be used. There's no need for a file or folder name to be a short essay. That's the purpose of files and folders: To help you store and refind your short essays. Anyone who wants to name a file "Me and the wife at the beach at sunset July 23 2017 with the O'Connors.jpg" is not grasping the idea of organization. That's probably fine on Macs. As the AOL of computing, Macs are supposed to be foolproof, requiring only consumerism to use, not expertise. Is backward compatibility a weakness of Windows? Some zealot Apple fans, no doubt, think so. So what? They don't have to use Windows. And we don't have to use Macs. I'm perfectly happy writing this post on my 16 year old XP OS, for which nearly all current software is still supported. Let them scorn. |
Ads |
#152
|
|||
|
|||
Can a Macintosh person tell us how to change the name of a file?
On 19-12-2017 4:05, Erilar wrote:
nospam wrote: In article , Arthur Wood wrote: Can a Macintosh person tell us how to change the name of a file? troll. Either that or a trump voter 8-) Whats the difference? |
#153
|
|||
|
|||
Can a Macintosh person tell us how to change the name of a file?
In message s.com Wolffan wrote:
On 2017 Dec 14, Your Name wrote (in article ): I don't know about Windows, but Mac OS X can have at least four letter extensions (.tiff, .jpeg, .html for example). Windows no longer cares how long the extension is. Windows (and, I think, but I’m not certain macOS) cares only that the entire filename and dot and extension is 255 characters or less and that certain illegal characters, notably slashes, are not used. There was a problem where Windows had a max path of 255 characters, later 260 characters, but Microsoft was pulled trickery and there’s a path length maximum of 32,767 characters which can be extended if you really, really, REALLY want to go to a lot of trouble. I have a file on my Desktop named 11/22/63. Windows restricts many characters from filenames. I submit that 255 character filenames, including dot and extension, is plenty for mere mortals, as is a 32,767 character path. Windows breaks on paths longer than 260 characters, badly. I don’t know what the max path length is on macOS. It appears to exceed 32,767 characters. I haven’t attempted to test that. Have at it. HFS+ has no limit on path length, but I think macOS does. I don't recall what it is. -- I'm completely in favor of the separation of Church and State. My idea is that these two institutions screw us up enough on their own, so both of them together is certain death. |
#154
|
|||
|
|||
Can a Macintosh person tell us how to change the name of a file?
In article ,
Lewis wrote: In message s.com Wolffan wrote: On 2017 Dec 14, Your Name wrote (in article ): I don't know about Windows, but Mac OS X can have at least four letter extensions (.tiff, .jpeg, .html for example). Windows no longer cares how long the extension is. Windows (and, I think, but I’m not certain macOS) cares only that the entire filename and dot and extension is 255 characters or less and that certain illegal characters, notably slashes, are not used. There was a problem where Windows had a max path of 255 characters, later 260 characters, but Microsoft was pulled trickery and there’s a path length maximum of 32,767 characters which can be extended if you really, really, REALLY want to go to a lot of trouble. I have a file on my Desktop named 11/22/63. There's actually some trickery going on here. Mac OS X "allows" slashes in file names, but they are actually represented internally as colons. Any colons in a filename are displayed as slashes by the Finder (but not the terminal), and the Finder won't allow you to use a colon in a filename. This bit of oddness results from the switch from the switch from classic Mac OS to Mac OS X. Classic used colons as path separators and thus allowed slashes but not colons in filenames. When OS X was introduced, they opted to maintain the illusion that the allowable characters had remained the same. Andre -- To email remove 'invalid' & replace 'gm' with well known Google mail service. |
#155
|
|||
|
|||
Can a Macintosh person tell us how to change the name of a file?
On 2017 Dec 19, Lewis wrote
(in article ): In upernews.com Wolffan wrote: On 2017 Dec 14, Your Name wrote (in ): I don't know about Windows, but Mac OS X can have at least four letter extensions (.tiff, .jpeg, .html for example). Windows no longer cares how long the extension is. Windows (and, I think, but I’m not certain macOS) cares only that the entire filename and dot and extension is 255 characters or less and that certain illegal characters, notably slashes, are not used. There was a problem where Windows had a max path of 255 characters, later 260 characters, but Microsoft was pulled trickery and there’s a path length maximum of 32,767 characters which can be extended if you really, really, REALLY want to go to a lot of trouble. I have a file on my Desktop named 11/22/63. I suspect that that's not how that file is seen by the system. Windows restricts many characters from filenames. yes. That’s why I said ‘certain illegal characters’. I submit that 255 character filenames, including dot and extension, is plenty for mere mortals, as is a 32,767 character path. Windows breaks on paths longer than 260 characters, badly. Many years ago I created a test path: a file with a 60-character name, inside a folder with the same name and so on to a depth of six levels. Earlier versions of Windows broke when presented with this. The current version has no problems that I can detect with this. I suppose that one day I could add a few levels of folders, but the tested path length exceeds anything I’m ever likely to need, so I simply don’t care. I don’t know what the max path length is on macOS. It appears to exceed 32,767 characters. I haven’t attempted to test that. Have at it. HFS+ has no limit on path length, but I think macOS does. I don't recall what it is. Once you get past a few hundred characters worth of path, very few people care. |
#156
|
|||
|
|||
Can a Macintosh person tell us how to change the name of a file?
Lewis wrote:
In message s.com Wolffan wrote: On 2017 Dec 14, Your Name wrote (in article ): I don't know about Windows, but Mac OS X can have at least four letter extensions (.tiff, .jpeg, .html for example). Windows no longer cares how long the extension is. Windows (and, I think, but I’m not certain macOS) cares only that the entire filename and dot and extension is 255 characters or less and that certain illegal characters, notably slashes, are not used. There was a problem where Windows had a max path of 255 characters, later 260 characters, but Microsoft was pulled trickery and there’s a path length maximum of 32,767 characters which can be extended if you really, really, REALLY want to go to a lot of trouble. I have a file on my Desktop named 11/22/63. Windows restricts many characters from filenames. I submit that 255 character filenames, including dot and extension, is plenty for mere mortals, as is a 32,767 character path. Windows breaks on paths longer than 260 characters, badly. I don’t know what the max path length is on macOS. It appears to exceed 32,767 characters. I haven’t attempted to test that. Have at it. HFS+ has no limit on path length, but I think macOS does. I don't recall what it is. In the spirit of bar bets and mindless discussion, there is a mention of a 32,767 capability here. But I can read and re-read this section as many times as I want, and not be sure exactly how this manifests in every day usage. Does it actually work ? Previous Windows OSes didn't even allow us to turn it on (as if it was a Server OS function). Now, there is a registry key for it in Windows 10. "Naming Files, Paths, and Namespaces" https://msdn.microsoft.com/en-us/lib...).aspx#maxpath "Tip: Starting in Windows 10, version 1607, MAX_PATH limitations have been removed from common Win32 file and directory functions. However, you must opt-in to the new behavior. A registry key allows you to enable or disable the new long path behavior. To enable long path behavior set the registry key at HKLM\SYSTEM\CurrentControlSet\Control\FileSystem LongPathsEnabled DWORD ??? The key's value will be cached by the system (per process) after the first call to an affected Win32 file or directory function (list follows). The registry key will not be reloaded during the lifetime of the process. In order for all apps on the system to recognize the value of the key, a reboot might be required because some processes may have started before the key was set. " So someone who wants to win a bar bet, can switch that on and tell us what broke. They never seem to word that section as if it's an "unreserved" capability. The section describing that is written by lawyers. I know the programs I've written, have statically declared data structures for the smaller limit (approx 260). That's for strings where I input the file name to be substituted for stdin and stdout. My program thus prevents any "perverse" usage. I might be unable to access a really long path (if such a thing really exists). That's what makes these questions so much fun. And you don't have to break a sweat to test. There's bar bets all over the place. For example, since Perl might not provide sufficient support, someone appears to have thrown in a proposed Win32 example. http://www.perlmonks.org/?node_id=844566 "If you want to create a totally impractical path with 32k chars, compile and run this. (WARNING: It is a bitch to delete!) #include stdio.h #include windows.h wchar_t path[ 32768 ] = L"\\\\?\\c:\\1234567890\\"; wchar_t name[] = L"1234567890\\"; int main( int argc, char **argv ) { while( CreateDirectoryW( path, NULL ) ) { wcscat( path, name ); }; printf( "Error %d\n", GetLastError() );; } " I believe the "bitch" part in the comment. I've been there and done stuff like that before. It'll loosen up a few hair follicles. Paul |
#157
|
|||
|
|||
Can a Macintosh person tell us how to change the name of a file?
On 2017 Dec 14, nospam wrote
(in ) : In , Mayayana wrote: And, since you like to quibble: is the MIME header part of a post or not? I would quibble that it is, since it has to be included with the post so that the client can display the contents properly. You should know that nospam is a compulsive arguer who regularly carries on bickering matches that go into hundreds of posts. If you answer, he *will* argue. He's also very adept at the appearance of knowledge, using generalities and undefined declarations ("not so", "nonsense", etc) to appear to be discussing a topic expertly. ad hominem. fact. you've done it to me. |
#158
|
|||
|
|||
Can a Macintosh person tell us how to change the name of a file?
In message s.com Wolffan wrote:
On 2017 Dec 19, Lewis wrote (in article ): In upernews.com Wolffan wrote: On 2017 Dec 14, Your Name wrote (in ): I don't know about Windows, but Mac OS X can have at least four letter extensions (.tiff, .jpeg, .html for example). Windows no longer cares how long the extension is. Windows (and, I think, but I’m not certain macOS) cares only that the entire filename and dot and extension is 255 characters or less and that certain illegal characters, notably slashes, are not used. There was a problem where Windows had a max path of 255 characters, later 260 characters, but Microsoft was pulled trickery and there’s a path length maximum of 32,767 characters which can be extended if you really, really, REALLY want to go to a lot of trouble. I have a file on my Desktop named 11/22/63. I suspect that that's not how that file is seen by the system. It is. the Mac has always allowed /'s in filenames. The only forbidden character in macOS is the ':' character. Windows restricts many characters from filenames. yes. That’s why I said ‘certain illegal characters’. I submit that 255 character filenames, including dot and extension, is plenty for mere mortals, as is a 32,767 character path. Windows breaks on paths longer than 260 characters, badly. Many years ago I created a test path: a file with a 60-character name, inside a folder with the same name and so on to a depth of six levels. Earlier versions of Windows broke when presented with this. The current version has no problems that I can detect with this. I suppose that one day I could add a few levels of folders, but the tested path length exceeds anything I’m ever likely to need, so I simply don’t care. I've had Windows apps fail because of path length issues. Not just once, but many times. I don’t know what the max path length is on macOS. It appears to exceed 32,767 characters. I haven’t attempted to test that. Have at it. HFS+ has no limit on path length, but I think macOS does. I don't recall what it is. Once you get past a few hundred characters worth of path, very few people care. With backups it can be very easy to get 200+ character pathnames if you structure (or over-structure) the directory tree. -- Just give us a kiss to celebrate here, today. |
#159
|
|||
|
|||
Can a Macintosh person tell us how to change the name of a file?
In message Andre G. Isaak wrote:
In article , Lewis wrote: In message s.com Wolffan wrote: On 2017 Dec 14, Your Name wrote (in article ): I don't know about Windows, but Mac OS X can have at least four letter extensions (.tiff, .jpeg, .html for example). Windows no longer cares how long the extension is. Windows (and, I think, but I’m not certain macOS) cares only that the entire filename and dot and extension is 255 characters or less and that certain illegal characters, notably slashes, are not used. There was a problem where Windows had a max path of 255 characters, later 260 characters, but Microsoft was pulled trickery and there’s a path length maximum of 32,767 characters which can be extended if you really, really, REALLY want to go to a lot of trouble. I have a file on my Desktop named 11/22/63. There's actually some trickery going on here. Mac OS X "allows" slashes in file names, but they are actually represented internally as colons. No, you have that wrong. the Path Separator on HFS and HFS+ is the ':' and has been forever. Any colons in a filename are displayed as slashes by the Finder (but not the terminal), and the Finder won't allow you to use a colon in a filename. No, any slashes in a filename are represented to the unix layer as colons. This bit of oddness results from the switch from the switch from classic Mac OS to Mac OS X. Classic used colons as path separators and thus allowed slashes but not colons in filenames. When OS X was introduced, they opted to maintain the illusion that the allowable characters had remained the same. Nope. You have the details entirely wrong. -- "If this was a dictatorship it would be a lot easier; as long as I was the dictator." -- George W Bush |
#160
|
|||
|
|||
Can a Macintosh person tell us how to change the name of a file?
Lewis wrote:
In message s.com Wolffan wrote: On 2017 Dec 19, Lewis wrote (in article ): In upernews.com Wolffan wrote: On 2017 Dec 14, Your Name wrote (in ): I don't know about Windows, but Mac OS X can have at least four letter extensions (.tiff, .jpeg, .html for example). Windows no longer cares how long the extension is. Windows (and, I think, but I’m not certain macOS) cares only that the entire filename and dot and extension is 255 characters or less and that certain illegal characters, notably slashes, are not used. There was a problem where Windows had a max path of 255 characters, later 260 characters, but Microsoft was pulled trickery and there’s a path length maximum of 32,767 characters which can be extended if you really, really, REALLY want to go to a lot of trouble. I have a file on my Desktop named 11/22/63. I suspect that that's not how that file is seen by the system. It is. the Mac has always allowed /'s in filenames. The only forbidden character in macOS is the ':' character. Wrong |
#161
|
|||
|
|||
Can a Macintosh person tell us how to change the name of a file?
Lewis wrote:
In message Andre G. Isaak wrote: In article , Lewis wrote: In message s.com Wolffan wrote: On 2017 Dec 14, Your Name wrote (in article ): I don't know about Windows, but Mac OS X can have at least four letter extensions (.tiff, .jpeg, .html for example). Windows no longer cares how long the extension is. Windows (and, I think, but I’m not certain macOS) cares only that the entire filename and dot and extension is 255 characters or less and that certain illegal characters, notably slashes, are not used. There was a problem where Windows had a max path of 255 characters, later 260 characters, but Microsoft was pulled trickery and there’s a path length maximum of 32,767 characters which can be extended if you really, really, REALLY want to go to a lot of trouble. I have a file on my Desktop named 11/22/63. There's actually some trickery going on here. Mac OS X "allows" slashes in file names, but they are actually represented internally as colons. No, you have that wrong. the Path Separator on HFS and HFS+ is the ':' and has been forever. Wrong. It has been that on Classic MacOS Any colons in a filename are displayed as slashes by the Finder (but not the terminal), and the Finder won't allow you to use a colon in a filename. No, any slashes in a filename are represented to the unix layer as colons. This bit of oddness results from the switch from the switch from classic Mac OS to Mac OS X. Classic used colons as path separators and thus allowed slashes but not colons in filenames. When OS X was introduced, they opted to maintain the illusion that the allowable characters had remained the same. Nope. You have the details entirely wrong. |
#162
|
|||
|
|||
Can a Macintosh person tell us how to change the name of a file?
On 2017-12-20 5:23 AM, Peter Köhlmann wrote:
Lewis wrote: In message s.com Wolffan wrote: On 2017 Dec 19, Lewis wrote (in article ): In upernews.com Wolffan wrote: On 2017 Dec 14, Your Name wrote (in ): I don't know about Windows, but Mac OS X can have at least four letter extensions (.tiff, .jpeg, .html for example). Windows no longer cares how long the extension is. Windows (and, I think, but I’m not certain macOS) cares only that the entire filename and dot and extension is 255 characters or less and that certain illegal characters, notably slashes, are not used. There was a problem where Windows had a max path of 255 characters, later 260 characters, but Microsoft was pulled trickery and there’s a path length maximum of 32,767 characters which can be extended if you really, really, REALLY want to go to a lot of trouble. I have a file on my Desktop named 11/22/63. I suspect that that's not how that file is seen by the system. It is. the Mac has always allowed /'s in filenames. The only forbidden character in macOS is the ':' character. Wrong In what way is that wrong? |
#163
|
|||
|
|||
Can a Macintosh person tell us how to change the name of a file?
Alan Baker wrote:
On 2017-12-20 5:23 AM, Peter Köhlmann wrote: Lewis wrote: In message s.com Wolffan wrote: On 2017 Dec 19, Lewis wrote (in article ): In upernews.com Wolffan wrote: On 2017 Dec 14, Your Name wrote (in ): I don't know about Windows, but Mac OS X can have at least four letter extensions (.tiff, .jpeg, .html for example). Windows no longer cares how long the extension is. Windows (and, I think, but I’m not certain macOS) cares only that the entire filename and dot and extension is 255 characters or less and that certain illegal characters, notably slashes, are not used. There was a problem where Windows had a max path of 255 characters, later 260 characters, but Microsoft was pulled trickery and there’s a path length maximum of 32,767 characters which can be extended if you really, really, REALLY want to go to a lot of trouble. I have a file on my Desktop named 11/22/63. I suspect that that's not how that file is seen by the system. It is. the Mac has always allowed /'s in filenames. The only forbidden character in macOS is the ':' character. Wrong In what way is that wrong? That the Mac has always allowed "/" as a filename character. It is forbidden as that in the unix layer. And actually, you can't create a file with a "/" as part of the name |
#164
|
|||
|
|||
Can a Macintosh person tell us how to change the name of a file?
On 2017-12-20 3:23 PM, Peter Köhlmann wrote:
Alan Baker wrote: On 2017-12-20 5:23 AM, Peter Köhlmann wrote: Lewis wrote: It is. the Mac has always allowed /'s in filenames. The only forbidden character in macOS is the ':' character. Wrong In what way is that wrong? That the Mac has always allowed "/" as a filename character. It is forbidden as that in the unix layer. And actually, you can't create a file with a "/" as part of the name I just this moment created a folder on the desktop: '2017/12/20 "/"test.' (The surrounding single quotes are not part of the name). In the Unix layer (i.e. from a bash command line), I see it as: '2017:12:20 ":"test.' |
#165
|
|||
|
|||
Can a Macintosh person tell us how to change the name of a file?
In article , Peter Köhlmann
wrote: I have a file on my Desktop named 11/22/63. I suspect that that's not how that file is seen by the system. It is. the Mac has always allowed /'s in filenames. The only forbidden character in macOS is the ':' character. Wrong In what way is that wrong? That the Mac has always allowed "/" as a filename character. It is forbidden as that in the unix layer. classic mac os did not use unix, which means there was no prohibition for files with a / in the name. only : was prohibited. everything else, including control characters, were allowed in file names. for mac os x, which does have unix under the hood, the answer depends on the api being used. conversion between the two is far more complex than it might appear. in either case, ultimately on disk, / is a valid file name character and : is a path separator. And actually, you can't create a file with a "/" as part of the name wrong. in terminal, type: touch foo:bar in finder, a file foo/bar will appear. |
Thread Tools | |
Display Modes | Rate This Thread |
|
|