FUNCTION ForceFlushEndWithT IF ! 'CLSHEAP'$UPPER(SET('PROCEDURE')) SET PROCEDURE TO ClsHeap ADDITIVE ENDIF CLOSE ALL DECLARE INTEGER GetActiveWindow IN WIN32API DECLARE INTEGER SHFileOperation IN SHELL32.DLL STRING @ LPSHFILEOPSTRUCT SET PROCEDURE TO CLSHEAP ADDITIVE oHeap = CREATEOBJ('Heap') cSource = FULLPATH(CURDIR()) cDest = cSource + SYS(2015) + '\' MKDIR (cDest) #DEFINE FO_COPY 2 #DEFINE FO_DELETE 3 #DEFINE FOF_NOCONFIRMATION 0x10 && Don't prompt the user. #DEFINE FOF_NOCONFIRMMKDIR 0x200 && don't confirm making any needed dirs #DEFINE FOF_ALLOWUNDO 0x40 && permit undo action cSourceString = cSource + '.??T' + CHR(0) + CHR(0) cDestString = cDest + CHR(0) + CHR(0) nStringBase = oHeap.AllocBlob(cSourceString+cDestString) cFileOpStruct = NumToDWORD(GetActiveWindow()) + ; NumToDWORD(FO_COPY) + ; NumToDWORD(nStringBase) + ; NumToDWORD(nStringBase + LEN(cSourceString)) + ; NumToDWORD(FOF_NOCONFIRMATION + FOF_NOCONFIRMMKDIR) + ; CHR(0) + ; NumToDWORD(0) + ; NumToDWORD(0) =SHFileOperation(cFileOpStruct) cSourceString = cDest + '.??T' + CHR(0) + CHR(0) cDestString = cSource + CHR(0) + CHR(0) nStringBase = oHeap.AllocBlob(cSourceString+cDestString) cFileOpStruct = NumToDWORD(GetActiveWindow()) + ; NumToDWORD(FO_COPY) + ; NumToDWORD(nStringBase) + ; NumToDWORD(nStringBase + LEN(cSourceString)) + ; NumToDWORD(FOF_NOCONFIRMATION + FOF_NOCONFIRMMKDIR + FOF_ALLOWUNDO) + ; CHR(0) + ; NumToDWORD(0) + ; NumToDWORD(0) =SHFileOperation(cFileOpStruct) cSourceString = cDest + '.??T' + CHR(0) + CHR(0) cDestString = CHR(0) + CHR(0) nStringBase = oHeap.AllocBlob(cSourceString+cDestString) cFileOpStruct = NumToDWORD(GetActiveWindow()) + ; NumToDWORD(FO_DELETE) + ; NumToDWORD(nStringBase) + ; NumToDWORD(nStringBase + LEN(cSourceString)) + ; NumToDWORD(FOF_NOCONFIRMATION + FOF_NOCONFIRMMKDIR + FOF_ALLOWUNDO) + ; CHR(0) + ; NumToDWORD(0) + ; NumToDWORD(0) =SHFileOperation(cFileOpStruct) RMDIR (cDest) oHeap = '' RETURNI'm not guarenteeing error checking to prevent dumb naming errors, or that you have enough disk space or anything of that type; this is strictly a kludge I've put together that will bulk copy, recopy, delete the temp and remove the temp dir. Anyone who wants to bitch is welcome to go play in traffic; I don't need the bullshit. It works reasonably safely, and if it's a matter of copying and saving, it might help.