;Autor: ts-soft ;http://www.purebasic.fr/english/viewtopic.php?p=290420#p290420 EnableExplicit #FOF_NOERRORUI = $400 Procedure FilesCreateMem(Array files.s(1)) Protected i, j, size, *mem, *pmem j = ArraySize(files()) For i = 0 To j If Right(files(i), 1) = "\" : files(i) = Left(files(i), Len(files(i)) - 1) : EndIf size + StringByteLength(files(i)) + 1 * SizeOf(Character) Next size + 1 * SizeOf(Character) *mem = AllocateMemory(size) If *mem *pmem = *mem For i = 0 To j PokeS(*pmem, files(i)) *pmem + StringByteLength(files(i)) + 1 * SizeOf(Character) Next EndIf ProcedureReturn *mem EndProcedure Procedure FilesMove(Array sources.s(1), Array dest.s(1), flags = #FOF_NOCONFIRMATION | #FOF_NOCONFIRMMKDIR | #FOF_NOERRORUI) Protected info.SHFILEOPSTRUCT Protected *source, *dest, result *source = FilesCreateMem(sources()) *dest = FilesCreateMem(dest()) If *source And *dest With info \hwnd = GetForegroundWindow_() \wFunc = #FO_MOVE \pFrom = *source \pTo = *dest \fFlags = flags ;\lpszProgressTitle = @Titel result = SHFileOperation_(info) If \fAnyOperationsAborted result = 1 EndIf FreeMemory(*source) : FreeMemory(*dest) ProcedureReturn result EndWith Else If *source : FreeMemory(*source) : EndIf If *dest : FreeMemory(*dest) : EndIf ProcedureReturn #False EndIf EndProcedure Dim Sources.s(100) Dim Dest.s(1) Sources(0) = "D:\MyFolder\" Dest(0) = "E:\FolderCopy\" FilesMove(Sources(), Dest()) ; IDE Options = PureBasic 5.31 (Windows - x64) ; CursorPosition = 2 ; Folding = - ; EnableUnicode ; EnableXP ; EnableUser ; EnableCompileCount = 0 ; EnableBuildCount = 0