flat assembler
Message board for the users of flat assembler.
Index
> Windows > SetCurrentDirectory case insensitive |
Author |
|
AlexP 21 Dec 2007, 03:14
for one, you are using 'puts'. You shouldn't use that. Second, windows is probably, (after it verifies the path) just spitting out the string you gave it. I don't think it would bother to look up the "real" name if the name you gave it works just fine. Think of it this way: If files are case-insensitive, and you were the windows designer, do you think that you would take the file path, verify it, then lookup the lower-case file name, then use that? NOOO You would just give back in the case that the user gave it. Should work just fine, if you want to check if the user has inputted a file name with any capitals, just cycle through the bytes checking for ones below 0x61. That should verify that the string has all lowercase letters
|
|||
21 Dec 2007, 03:14 |
|
revolution 21 Dec 2007, 03:43
zxcv wrote: How can i fix it? |
|||
21 Dec 2007, 03:43 |
|
zxcv 21 Dec 2007, 06:48
GetFullPathNameA same as GetCurrentCirectoryA.
in filename i gave '.'. Why cmd.exe know how to do it? How it do it? |
|||
21 Dec 2007, 06:48 |
|
revolution 21 Dec 2007, 07:27
There a few file related API's. I think you just need to try them one by one to see which one gives you what you want.
FindFirstFile? |
|||
21 Dec 2007, 07:27 |
|
zxcv 21 Dec 2007, 07:50
FindFirstFile works ok, but give me only 1 name (Desktop).
I hope thers another way to do that. |
|||
21 Dec 2007, 07:50 |
|
f0dder 21 Dec 2007, 10:22
FindFirstFile will give you the "real name" of the folder. GetLongPathName() seems to work as well, but I'm not sure whether it'll fail on some windows versions when using a "long filename" as input...
|
|||
21 Dec 2007, 10:22 |
|
zxcv 21 Dec 2007, 12:10
yes!!
finally, thanks much! |
|||
21 Dec 2007, 12:10 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.