Hi,
I am trying to copy multiple files to one location.I am using below code.
ie

.data
szFrom db "aa.txt",0,"bb.txt","aaaa",0,0 ;files and directories are supported
szTo db "c:\test",0,0
.data?
CopyParms SHFILEOPSTRUCT <>
.code
CopyFiles proc szFrom:DWORD,szTo:DWORD
mov eax,szFrom
mov ecx,szTo
mov CopyParms.hwnd,0
mov CopyParms.wFunc,FO_COPY
mov    CopyParms.pFrom,eax    ;Set from path
mov    CopyParms.pTo,ecx
mov    CopyParms.fFlags,FOF_NOCONFIRMATION or FOF_NOCONFIRMMKDIR or FOF_SILENT
mov    CopyParms.fAnyOperationsAborted,0
mov    CopyParms.hNameMappings,0
mov    CopyParms.lpszProgressTitle,0
invoke  SHFileOperation,ADDR CopyParms
ret
CopyFiles endp


However if any file in the pFrom does not exists function doesnt work.I want to go to next file if the file does not exist.I didnt found any flag for this.ShFileoperariton is recursive so it can copy directories too.So before writing this custom function, I want to ask you if you have anything similar.Thanks
Posted on 2006-01-17 16:21:51 by LaptoniC