That function is an API Call. Put the following declaration in a module (*.bas):

--------------------
Declare Function RemoveDirectory Lib "kernel32.dll" Alias "RemoveDirectoryA" (ByVal lpPathName As String) As Long
--------------------

(It declares to VB a function RemoveDirectory, located in kernel32.dll, in this dll the function is under the name "RemoveDirectoryA", it has one expected argument and returns a Long-value.

Hope the code works,


Quintonir