Cory Posted August 18, 2007 Report Share Posted August 18, 2007 In W2k and XP wildcard file operations are done in reverse alphabetical order for normal characters a-z and 0-9. But special printable characters (limited to the set 32-126) act unpredictably. Can someone explain the rule to me? Please understand I am not talking about how things are displayed in an Explorer window. I know that starting in XP they got clever to give more intelligent sorts but that’s not what I’m looking for now. Having said that if anyone has a write up on the logic there I would love to see it. But for this question I’m talking about what happens when you do something like an XCOPY. Now I’m assuming that the order convention for a command prompt copy command is the same as it is for ME. If I got that wrong please let me know what the deal is. Also if my assumption is correct again please let me know. To elaborate on my question I always thought that if you did a copy command it did it in reverse ASCII order. But now I’m not so sure. Assuming the DIR command operates the same way this is not so. It appears that the special characters before 0-9 appear in order and the special characters after the lower case letters appear in their proper place but the special characters between the lower and upper case letters seem to fall someplace on the end. Huh? Now functionally I only need to know one thing to solve my problem at hand: What it the highest character in the valid file name set? IOW what can I name a file to ensure that a copy operation will try to act on it first prior to any other files in the folder? But my curiosity is piqued so I’d also really like to know what the overall story is here. Also it would be useful to know how this will work in Vista and or ME. Quote Link to comment Share on other sites More sharing options...
paul Posted August 19, 2007 Report Share Posted August 19, 2007 In W2k and XP wildcard file operations are done in reverse alphabetical order for normal characters a-z and 0-9. But special printable characters (limited to the set 32-126) act unpredictably. Can someone explain the rule to me? I've never heard of any rule like this! In order to test this out, I did the following: - created 2 new folders, D:\Test1 and D:\Test2 - copied one 90-megabyte file 12 times into D:\Test1, called respectively a1, a2, b1, b2, c1, c2, z2, z1, y2, y1, x2, x1 all with an extension of .txt - issued the following command from a Dos prompt: copy D:\Test1\?1.txt D:\Test2 As I'd expected, the files were copied in alphabetic sequence starting with a1.txt. Various other file operations using Xcopy resulted in the same sequence. Quote Link to comment Share on other sites More sharing options...
Cory Posted August 20, 2007 Author Report Share Posted August 20, 2007 You example only has files in one set, lower case a-z. In the ASCII set there are special charcters lik "[" that appear between a-z and A-Z. I'll write up a better example when I have more time. Mainly I want to know what the last character is. I'm thinking it might be "~". You know I was just checking somethign and realized I made an assumption I shouldn't have. I thought xcopy worked the same as the Windows Explorer. In Windows Explorer (like if you do a drag and drop) it copies in reverse order. But Windows Explorer in Vista copies in alphabetical order. I'll make som samples and write more later. 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.