win32Lib request for RemoveDirectoryA

new topic     » topic index » view thread      » older message » newer message

Derek,

I'm looking for a deltree/y or RMDIR/S/y equivalent.

Can you add a wrapper for RemoveDirectoryA to win32lib along with an
example please.

I added the following to my copy of win32Kernel.ew and win32file.ew.

global constant
xRemoveDirectory = registerw32Function
kernel32, "RemoveDirectoryA",{C_POINTER},C_LONG)

global function removeDirectory(sequence name)
    atom a
    atom r

    a = w32acquire_mem(0, name)

    r = w32Func(xRemoveDirectory,{a})

    w32release_mem(a)

    return r
end function

I recognise that the directory has to be empty but it fails to delete
a directory outside my BIN folder. How do I give my programme delete access?

Do I have to write the following to get it to work?

?moveFile("C:\\new_folder_xyz", "C:\\euphoria\\bin\\new_folder_xyz")

?removeDirectory("new_folder_xyz")

Regards,

Bob

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu