Hello,
after upgrading from Sierra to Mojave, I noticed that files loaded from a folder are not loaded alphabetically.
The folder contains about 80 files named 01, 02, 03 etc., and the code is the usual:
mArray() as string
for i as integer = 1 to f.count
doSomethingWith f.trueItem(i)
next
where I expect the result of the loop to depend on alphabetically loaded files.
So now, in Mojave, I changed the approach, creating an array of all the f.trueItems(i).NativePath, sorting the array, and then performing the job using the array.
Is there a more simple way? Suggestions welcome.
Thanks.
Yes, you are right: there has never been any guaranty, especially (I guess) if file names started with capital and non-capital letter.
And I would add that usually one sorts a listbox after loading files. But in this particular in-house project, since files named 01, 02, 03 worked fine, I never bothered to apply the right approach.
Ive seen this behaviour for a while now (High Sierra) …it came in with the APFS file system.
Much less than 1% of my customers ever mentioned the problem. I’d estimate less than 1% were using APFS, but new installs of Mojave
I havent found one yet.
It adds a few extra lines of code, but it has the advantage that you can custom sort if you wish… (maybe you display grouped by type, then by alphabetic filename…)
I upgraded to Mojave directly from Sierra, and I see that my file-system is APFS. Actually I do not know what file-system I had with Sierra. Could it be that installing Mojave the file-system too gets changed? I’m no expert on this topic.
Funny (different): I uploaded files in my Web MediaFire account yesterday and noticed the files were sorted by file size (smaller first / larger last). El Capitan.
Back to the OP: the idea is to load all files name for the target folder in an array, sort the array and use the result the way you actually do (recreation of a FolderItem using the FolderItem [Parent] and use it in the project).
If it asked, I never remember seeing it either… and my system internal drive IS now APFS (and I would have answered NO, if I’d been given a choice)… my external drives are all HFS+
That is unless it was already APFS (I bought it new Aug2017)
What this is doing there ? (Windows XP file System !).
Did you format your hard disk when you purchased it ?
How long does it takes (seconds or hours) ?
If No Or Yes and seconds: you have troubles with your hard disk.
Make a backup of your data on another hard disk,
Format your hard disk (this may takes hour to hours (depends on the size / HDD-SSD)
Install Mojave back to your hard disk,
Install back your data.
Just in case (I can be wrong): what people here think about what I wrote above ?
[quote=419433:@Emile Schwarz]File System: MS-DOS FAT32: What this is doing there ? (Windows XP file System !).
…
Just in case (I can be wrong): what people here think about what I wrote above ?[/quote]
This is correct because the EFI Partitition must be based on a FAT-Filesystem for backward compatibility.
FAT32 cries when you attempt to store a > 4GB file.
And, I do not have that in my System Report SATA/SATAExpress/ APPLE SSD SM0256F / EFI (Same UUID !).
Nota: El Capitan.
Mojave takes five cup of tea time to dring from boot HDD to the moment I can fire System Report !
But, if you are sure (even if this looks strange to me)
My Boot external Mojave also do not asked me about APFS (but it is APFS: I cannot access to its contents when I am running El Capitan ).
Or: I forgot (or wanted to know what it looks like).
BTW While updating to High Sierra, the Installer was asking me if i want to convert to APFS. While updating from High Sierra to Mojave, it was not asking me but informed me it will convert my internal Drive(s) from HPFS to APFS.
But it should still be possible to install without APFS conversion with the --converttoapfs NO switch.
NTFS is a robust FS released in 1992. I would not call it a more recent FS. Apple File System has been released to the public in 2017 and is indeed a recent FS. I am pretty sure that NTFS also had it’s flaws when it had been released and matured over time.
Both have their pros and cons. But for EFI a simple FS (without Journaling and other fancy stuff) is recommended.