Hi all,
My question is: can i remove directory and all files and subdirectories in it by one step. Are there any api function or other way to make it.

For me this is the best forum in all over th world
Posted on 2004-06-30 08:00:32 by martidim
You can do it in 2 steps, first remove all the files using SHFileOperation then remove the directory..

mov eax,hDlg

mov sfo.hwnd,eax
mov sfo.wFunc,FO_DELETE
mov sfo.pFrom,OFFSET Files
mov sfo.pTo,NULL
lea eax,sfoabort
mov sfo.fAnyOperationsAborted,eax
lea eax,szRemProject
mov sfo.lpszProgressTitle,eax
mov sfo.hNameMappings,NULL
invoke SHFileOperation,ADDR sfo

invoke RemoveDirectory,OFFSET RootPath

Files would be a wild card path such as C:TargetDir*.*

RootPath is the folder to remove ie: C:TargetDir
Posted on 2004-06-30 09:52:03 by donkey
I see you are from bulgaria too. Nice to see other people from BG here ...

What include is needed to invoke SHFileOperation ?

in win32.hlp is writen shellapi.h
Posted on 2004-07-01 23:04:59 by Gangleri
I use GoAsm, we don't use import libraries but I think it is in Shell32.lib & Shell32.inc
Posted on 2004-07-02 00:58:19 by donkey