! HELP - Long File Names - Please !

I cannot get [b]long filename[/b] functions to work in [b]windows 2000 Dos[/b], maybe there are seperate secret interrupts I don't know about. I have given up all hope after spending 48hours of variations.

I have tried all the 71xxh/int21h functions. I repeatedly get a return code of 3 - which is 'path not found', I even tried searching for '*', which should return everything and I still got the same result. I even tested it by successfully printing the byte[DS:EDX] to the screen.

Atleast, can someone help me out with some working NASM code, or an object to link in with NASM or something that actually works??

[code]
;=======================================================
; MY FILE FUNCTION in NASM
;=======================================================

str_newdirect db 'C:*.*',0,'$'

SECTION .bss

str_FileNMs resb 0x50000

SECTION .text

RENAME_FILE:

;----- Not needed but just incase -----------
mov edx, str_FileNMs ; Location of NEW Disk Transfer Area
mov eax, 0x1a00 ; Function SET DISK TRANSFER AREA ADDRESS
int 0x21 ; Run Interrupt
;----- END: Not needed but just incase ------

;----- Main Function Call -------------------
mov edx, str_newdirect ; Position of Filename
mov eax,0x714E ; Function Find First File - Long File Names
mov cx,ds ; Store DS in CX
mov es,cx ; Store DS in ES
mov ch,0x0 ; Clear CH
mov cl,0x0 ; Clear CL
mov edi, str_FileNMs ; Position of Results
mov si,0x0 ; Clear SI
int 0x21 ; Run Interrupt

; Returns Error Code EAX=0x03 : 'Path Not Found'
;----- END: Main Function Call --------------

;----- Extended Error Function Call ----
mov eax, 0x5900 ; Function Get Extended Error Message
int 0x21 ; Run Interrupt

; Returns Error Code EAX=3 : 'Path Not Found'
; Returns Error Code BH=8 : 'Not Found'
; Returns Error Code BL=3 : 'prompt user to reenter input'
; Returns Error Code ECX=2 : 'block device (disk error)'
;----- END: Extended Error Function Call ----

ret[/code]

Comments

  • : I cannot get [b]long filename[/b] functions to work in [b]windows 2000 Dos[/b], maybe there are seperate secret interrupts I don't know about. I have given up all hope after spending 48hours of variations.
    :
    : I have tried all the 71xxh/int21h functions. I repeatedly get a return code of 3 - which is 'path not found', I even tried searching for '*', which should return everything and I still got the same result. I even tested it by successfully printing the byte[DS:EDX] to the screen.
    :
    : Atleast, can someone help me out with some working NASM code, or an object to link in with NASM or something that actually works??
    :
    : [code]
    : ;=======================================================
    : ; MY FILE FUNCTION in NASM
    : ;=======================================================
    :
    : str_newdirect db 'C:*.*',0,'$'
    :
    : SECTION .bss
    :
    : str_FileNMs resb 0x50000
    :
    : SECTION .text
    :
    : RENAME_FILE:
    :
    : ;----- Not needed but just incase -----------
    : mov edx, str_FileNMs ; Location of NEW Disk Transfer Area
    : mov eax, 0x1a00 ; Function SET DISK TRANSFER AREA ADDRESS
    : int 0x21 ; Run Interrupt
    : ;----- END: Not needed but just incase ------
    :
    : ;----- Main Function Call -------------------
    : mov edx, str_newdirect ; Position of Filename
    : mov eax,0x714E ; Function Find First File - Long File Names
    : mov cx,ds ; Store DS in CX
    : mov es,cx ; Store DS in ES
    : mov ch,0x0 ; Clear CH
    : mov cl,0x0 ; Clear CL
    : mov edi, str_FileNMs ; Position of Results
    : mov si,0x0 ; Clear SI
    : int 0x21 ; Run Interrupt
    :
    : ; Returns Error Code EAX=0x03 : 'Path Not Found'
    : ;----- END: Main Function Call --------------
    :
    : ;----- Extended Error Function Call ----
    : mov eax, 0x5900 ; Function Get Extended Error Message
    : int 0x21 ; Run Interrupt
    :
    : ; Returns Error Code EAX=3 : 'Path Not Found'
    : ; Returns Error Code BH=8 : 'Not Found'
    : ; Returns Error Code BL=3 : 'prompt user to reenter input'
    : ; Returns Error Code ECX=2 : 'block device (disk error)'
    : ;----- END: Extended Error Function Call ----
    :
    : ret[/code]
    :
    Take a look there
    http://www.maverick.subnet.dk/FileSystemFormats/VFAT_LongFileNames.html

  • Finally, someone answered my question. But now I think I'm boggled again. How do I use this? What integer would I call to get a directory listing in VFAT? And what integer would I call to read/write a LFN in win2000?

    [code]
    Take a look there
    http://www.maverick.subnet.dk/FileSystemFormats/VFAT_LongFileNames.html
    [/code]
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories