terrypin Posted October 4, 2013 Report Share Posted October 4, 2013 This minor issue is no doubt due to some setting about sorting sequence either in ME Pro or XP, but I'd appreciate a heads up if there is a simple fix please. I'm using the Repeat with Folder command to work on the subfolder names within the target folder. I'd like the processing in the same order as the subfolders are displayed in the Explorer folder. For example, if have this target C:\Test ME Pro containing the following _Folder1_Folder2Folder3Folder4 and I run this macro (set to return Folders only) Repeat with Folder C:\Test ME Pro Text Box Display: Folder nameEnd Repeat then I want the successive messages to appear in the above order. But instead I get Folder3Folder4 _Folder1_Folder2 --Terry, East Grinstead, UK Quote Link to comment Share on other sites More sharing options...
Samrae Posted October 4, 2013 Report Share Posted October 4, 2013 Simple fix? Switch to WIndows 7 or 8. Are you using NTFS or FAT32 on your Windows XP system? It may be that you just need to upgrade to NTFS. Here's what happens: Macro Express requests the files in a certain folder. On Windows XP (or FAT32) information for the files is returned in the order they were written to the disk drive. On Windows Vista and later (or, possibly on an NTFS system) when Macro Express requests the files from Windows they are returned in alphabetical order. When you use Windows Explorer it sorts the list of files based on your sort criteria. They may be alphabetical, by file type or modified date. As a workaround you could store the list of files in an array and then have a macro sort the array. Quote Link to comment Share on other sites More sharing options...
Cory Posted October 4, 2013 Report Share Posted October 4, 2013 There are also differences in sort rules. In the past I've often noticed cleverness with Windows File Explorer like recognizing a series of file names begin with numbers and sorting them numerically instead of alphabetically. Once I even had a media folder of movies and it ignored initial articles like the word "The" in the alphabetization. But even at the command prompt I've seen a different order to a directory list. I think the main reason is because MEP is written in Delphi and it's classes have different ideas about the proper way to organize like putting special characters first. Anyway my point is that even within Windows File Explorer there can be different rules based on content and display options. The only fix I could see would be to see if using a VBScript or batch file to make a file name list to then process with. It might be more likely to make a list in the same order as what you're seeing. Quote Link to comment Share on other sites More sharing options...
paul Posted October 4, 2013 Report Share Posted October 4, 2013 I have always thought that the innate sort sequence is dictated by the file system, irrespective of OS. So NTFS returns files in name sequence, while FAT[32] returns them in no useful sequence. Quote Link to comment Share on other sites More sharing options...
terrypin Posted October 4, 2013 Author Report Share Posted October 4, 2013 Thanks all. Files are all NTFS. @Samrae: If I've understood you correctly, ME Pro processes this command 'correctly' in Window 7/8 but differently in XP. Anyone know why? Any NTFS/FAT32 distinction appears irrelevant in my case. So I'll resort the results after the processing. --Terry, East Grinstead, UK Quote Link to comment Share on other sites More sharing options...
terrypin Posted October 5, 2013 Author Report Share Posted October 5, 2013 There are also differences in sort rules. In the past I've often noticed cleverness with Windows File Explorer like recognizing a series of file names begin with numbers and sorting them numerically instead of alphabetically. Once I even had a media folder of movies and it ignored initial articles like the word "The" in the alphabetization. But even at the command prompt I've seen a different order to a directory list. I think the main reason is because MEP is written in Delphi and it's classes have different ideas about the proper way to organize like putting special characters first. Anyway my point is that even within Windows File Explorer there can be different rules based on content and display options. The only fix I could see would be to see if using a VBScript or batch file to make a file name list to then process with. It might be more likely to make a list in the same order as what you're seeing. Thanks, Cory, that sounds right about ME Pro using different sort rules. In the absence of a simple tweak or something I'll just accept the results ME Pro delivers and re-sort them afterwards. -- Terry, East Grinstead, UK Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.