Index: trunk/src/shell32/shlfileop.c
===================================================================
--- trunk/src/shell32/shlfileop.c	(revision 9550)
+++ trunk/src/shell32/shlfileop.c	(revision 9552)
@@ -20,5 +20,10 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
+
+#include "config.h"
+#include "wine/port.h"
+
 #include <string.h>
+
 #include "winreg.h"
 #include "shellapi.h"
@@ -32,5 +37,4 @@
 WINE_DEFAULT_DEBUG_CHANNEL(shell);
 
-#ifdef __WIN32OS2__
 BOOL SHELL_ConfirmDialog (int nKindOfDialog, LPCSTR szDir)
 {
@@ -57,5 +61,5 @@
 		break;
 	default:
-		FIXME(__FUNCTION__" Unhandled nKindOfDialog %d stub\n", nKindOfDialog);
+	  FIXME(" Unhandled nKindOfDialog %d stub\n", nKindOfDialog);
 		return FALSE;
 	}
@@ -63,38 +67,5 @@
 	LoadStringA(shell32_hInstance, caption_resource_id, szCaption, sizeof(szCaption));
 	LoadStringA(shell32_hInstance, text_resource_id, szText, sizeof(szText));
-#else
-BOOL SHELL_WarnItemDelete (int nKindOfDialog, LPCSTR szDir)
-{
-	char szCaption[255], szText[255], szBuffer[MAX_PATH + 256];
-
-        if(nKindOfDialog == ASK_DELETE_FILE)
-        {
-	  LoadStringA(shell32_hInstance, IDS_DELETEITEM_TEXT, szText, 
-		sizeof(szText));
-	  LoadStringA(shell32_hInstance, IDS_DELETEITEM_CAPTION, 
-		szCaption, sizeof(szCaption));
-	}
-        else if(nKindOfDialog == ASK_DELETE_FOLDER)
-        {
-	  LoadStringA(shell32_hInstance, IDS_DELETEITEM_TEXT, szText, 
-		sizeof(szText));
-	  LoadStringA(shell32_hInstance, IDS_DELETEFOLDER_CAPTION, 
-		szCaption, sizeof(szCaption));
-        }
-        else if(nKindOfDialog == ASK_DELETE_MULTIPLE_ITEM)
-        {
-	  LoadStringA(shell32_hInstance, IDS_DELETEMULTIPLE_TEXT, szText, 
-		sizeof(szText));
-	  LoadStringA(shell32_hInstance, IDS_DELETEITEM_CAPTION, 
-		szCaption, sizeof(szCaption));
-        }
-	else {
-          FIXME("Called without a valid nKindOfDialog specified!\n");
-	  LoadStringA(shell32_hInstance, IDS_DELETEITEM_TEXT, szText, 
-		sizeof(szText));
-	  LoadStringA(shell32_hInstance, IDS_DELETEITEM_CAPTION, 
-		szCaption, sizeof(szCaption));
-	}          
-#endif
+
 	FormatMessageA(FORMAT_MESSAGE_FROM_STRING|FORMAT_MESSAGE_ARGUMENT_ARRAY,
 	    szText, 0, 0, szBuffer, sizeof(szBuffer), (va_list*)&szDir);
@@ -120,7 +91,7 @@
 	strcat(szTemp, "*.*");
 
-	if (bShowUI && !SHELL_WarnItemDelete(ASK_DELETE_FOLDER, pszDir))
+	if (bShowUI && !SHELL_ConfirmDialog(ASK_DELETE_FOLDER, pszDir))
 	  return FALSE;
-	
+
 	if(INVALID_HANDLE_VALUE != (hFind = FindFirstFileA(szTemp, &wfd)))
 	{
@@ -132,5 +103,5 @@
 	      PathAddBackslashA(szTemp);
 	      strcat(szTemp, wfd.cFileName);
-	
+
 	      if(FILE_ATTRIBUTE_DIRECTORY & wfd.dwFileAttributes)
 	        SHELL_DeleteDirectoryA(szTemp, FALSE);
@@ -153,7 +124,7 @@
 BOOL SHELL_DeleteFileA(LPCSTR pszFile, BOOL bShowUI)
 {
-	if (bShowUI && !SHELL_WarnItemDelete(ASK_DELETE_FILE, pszFile))
+	if (bShowUI && !SHELL_ConfirmDialog(ASK_DELETE_FILE, pszFile))
 		return FALSE;
- 
+
         return DeleteFileA(pszFile);
 }
@@ -178,5 +149,5 @@
 
 /************************************************************************
- *      Win32DeleteFile                         [SHELL32.164]  
+ *      Win32DeleteFile                         [SHELL32.164]
  *
  * Deletes a file.  Also triggers a change notify if one exists.
@@ -197,5 +168,4 @@
 }
 
-#ifdef __WIN32OS2__
 /*************************************************************************
  *
@@ -224,4 +194,5 @@
 	if (i_len == 0) return				  TypisUnkn;
 	strcpy(pTemp,pFromTo);
+	if (pTemp[1] == ':' && pTemp[0] >= 'a' && pTemp[0] <= 'z') pTemp[0] = (pTemp[0] & (0xff - ' '));
 	*pFile = i_pFile = &pTemp[i_len];
 	pTemp[i_len+1] = '\0';
@@ -269,5 +240,5 @@
 			if (-1 == i_PathAttr || !(i_PathAttr & FILE_ATTRIBUTE_DIRECTORY)) Typ = TypisBad;
 		}
-		strcpy(pTemp,pFromTo);
+		strcpy(&pTemp[1],&pFromTo[1]);
 		if (Typ == TypisUnkn && i_PathAttr != -1 && (i_PathAttr & FILE_ATTRIBUTE_DIRECTORY)) {
  			if (NULL == strpbrk(i_pFile,"*?\0")) {
@@ -283,40 +254,16 @@
 	return Typ;
 }
-#else
-/**************************************************************************
- *	SHELL_FileNamesMatch()
- *
- * Accepts two \0 delimited lists of the file names. Checks whether number of
- * files in the both lists is the same.
- */
-BOOL SHELL_FileNamesMatch(LPCSTR pszFiles1, LPCSTR pszFiles2)
-{
-    while ((pszFiles1[strlen(pszFiles1) + 1] != '\0') &&
-           (pszFiles2[strlen(pszFiles2) + 1] != '\0'))
-    {
-        pszFiles1 += strlen(pszFiles1) + 1;
-        pszFiles2 += strlen(pszFiles2) + 1;
-    }
-
-    return
-        ((pszFiles1[strlen(pszFiles1) + 1] == '\0') &&
-         (pszFiles2[strlen(pszFiles2) + 1] == '\0')) ||
-        ((pszFiles1[strlen(pszFiles1) + 1] != '\0') &&
-         (pszFiles2[strlen(pszFiles2) + 1] != '\0'));
-}
-#endif
 
 /*************************************************************************
- * SHFileOperationA				[SHELL32.243]
+ * SHFileOperationA				[SHELL32.@]
  *
  * NOTES
  *     exported by name
  */
-DWORD WINAPI SHFileOperationA (LPSHFILEOPSTRUCTA lpFileOp)   
+DWORD WINAPI SHFileOperationA (LPSHFILEOPSTRUCTA lpFileOp)
 {
 	LPSTR pFrom = (LPSTR)lpFileOp->pFrom;
 	LPSTR pTo = (LPSTR)lpFileOp->pTo;
 	LPSTR pTempTo;
-#ifdef __WIN32OS2__
 	DWORD FromAttr;
 	DWORD ToAttr;
@@ -359,6 +306,5 @@
 	nlpFileOp.wFunc =  (level<<4) + FuncSwitch;
 	if (level == 1)
-#endif
-        TRACE("flags (0x%04x) : %s%s%s%s%s%s%s%s%s%s%s%s \n", lpFileOp->fFlags, 
+        TRACE("flags (0x%04x) : %s%s%s%s%s%s%s%s%s%s%s%s \n", lpFileOp->fFlags,
                 lpFileOp->fFlags & FOF_MULTIDESTFILES ? "FOF_MULTIDESTFILES " : "",
                 lpFileOp->fFlags & FOF_CONFIRMMOUSE ? "FOF_CONFIRMMOUSE " : "",
@@ -373,13 +319,8 @@
                 lpFileOp->fFlags & FOF_NOERRORUI ? "FOF_NOERRORUI " : "",
                 lpFileOp->fFlags & 0xf800 ? "MORE-UNKNOWN-Flags" : "");
-#ifdef __WIN32OS2__
 	switch(FuncSwitch) {
 	case FO_MOVE:
 		retCode = 0xb7;
 		pToFuncTXT = "FO_MOVE";
-#else
-	switch(lpFileOp->wFunc) {
-	case FO_MOVE:
-#endif
 	case FO_COPY:
         {
@@ -398,7 +339,6 @@
                  *                         ---------------
                  * copy files to dir       1 0 1 1 0 0 1 0
-                 * create dir              0 0 0 0 0 0 1 0 
+                 * create dir              0 0 0 0 0 0 1 0
                  */
-#ifdef __WIN32OS2__
 			nlpFileOp.pFrom = pTempFrom = HeapAlloc(GetProcessHeap(), 0, 3 * MAX_PATH+6);
 			nlpFileOp.pTo   = pTempTo   = &pTempFrom[MAX_PATH+4];
@@ -438,6 +378,4 @@
 				} /* endif */
 
-				TRACE(__FUNCTION__" %s level=%d From='%s' To='%s'\n", pToFuncTXT, level, pFrom, pTo);
-
                 FromTyp = SHFileTyp(pFrom, &lenFrom,
 									pTempFrom, &lenTempFrom,
@@ -445,5 +383,14 @@
 									&FromPathAttr, &FromAttr);
 
-// Check Source
+				zTyp  = ToTyp;
+                ToTyp = SHFileTyp(pTo, &lenTo,
+									pTempTo, &lenTempTo,
+									&pToFile,
+									&ToPathAttr, &ToAttr);
+
+				TRACE(__FUNCTION__" %s level=%d From='%s'(%d,%d,%d) To='%s'(%d,%d,%d)\n", pToFuncTXT,
+				 	level, pTempFrom, FromTyp, lenFrom, lenTempFrom, pTempTo, ToTyp, lenTo, lenTempTo);
+
+/* Check Source */
 				if (FromTyp != TypisDir
 				 && FromTyp != TypisFile
@@ -454,11 +401,5 @@
 						break;
 				} /* endif */
-				zTyp  = ToTyp;
-                ToTyp = SHFileTyp(pTo, &lenTo,
-									pTempTo, &lenTempTo,
-									&pToFile,
-									&ToPathAttr, &ToAttr);
-
-// fix for more then one source for one target 
+/* fix for more then one source for one target */
 				if (ToTyp == TypisUnkn
 				 && zTyp  <  TypisFile
@@ -469,7 +410,7 @@
 					lenTo = strlen(pTempTo);
 				} /* endif */
-// recursiv creating from directorys are not valid for FO_MOVE.
+/* recursiv creating from directorys are not valid for FO_MOVE. */
 				if (FuncSwitch == FO_MOVE && ToTyp == TypisNewPath) ToTyp = TypisUnkn;
-// Check Target
+/* Check Target */
 				if (ToTyp == TypisMask) {
 					nlpFileOp.fAnyOperationsAborted=TRUE;
@@ -532,5 +473,5 @@
 				case TypisDir: { /* Source is Dir  */
 						if (TargetisDir) {
-// From Root to Root not full tested, also no Comparsion in W98
+/* From Root to Root not full tested, also no Comparsion in W98 */
 							MakeDir = (!(lpFileOp->fFlags & FOF_MULTIDESTFILES) && ToTyp != TypisRoot);
 							break;
@@ -545,5 +486,5 @@
 						nlpFileOp.fAnyOperationsAborted=TRUE;
 						where = 210 + FromTyp;
-//						retCode=0x750;
+/*						retCode=0x750; */
 						break;
 					}
@@ -564,5 +505,5 @@
 					PathRemoveFileSpecA(pTempFrom);
 					lenTempTo = strlen(pTempFrom);
-					strcpy(pTempFrom,pFrom);
+					strcpy(&pTempFrom[1],&pFrom[1]);
 					if (pTempFrom[lenTempTo-1] == '\\') lenTempTo--;
 					strcpy(pToFile,&pFrom[lenTempTo]);
@@ -654,151 +595,9 @@
 			}
 			break;
-#else
-                int multifrom = pFrom[strlen(pFrom) + 1] != '\0';
-                int destisdir = PathIsDirectoryA( pTo );
-                int todir = 0;
-
-                if (lpFileOp->wFunc == FO_COPY)
-                    TRACE("File Copy:\n");
-                else
-                    TRACE("File Move:\n");
-
-                if( destisdir ) {
-                    if ( !((lpFileOp->fFlags & FOF_MULTIDESTFILES) && !multifrom))
-                        todir = 1;
-                } else {
-                    if ( !(lpFileOp->fFlags & FOF_MULTIDESTFILES) && multifrom)
-                        todir = 1;
-                }
-
-                if ((pTo[strlen(pTo) + 1] != '\0') &&
-                    !(lpFileOp->fFlags & FOF_MULTIDESTFILES))
-                {
-                    WARN("Attempt to use multiple file names as a destination "
-                         "without specifying FOF_MULTIDESTFILES\n");
-                    return 1;
-                }
-
-                if ((lpFileOp->fFlags & FOF_MULTIDESTFILES) &&
-                    !SHELL_FileNamesMatch(pTo, pFrom))
-                {
-                    WARN("Attempt to use multiple file names as a destination "
-                         "with mismatching number of files in the source and "
-                         "destination lists\n");
-                    return 1;
-                }
-
-                if ( todir ) {
-                    char szTempFrom[MAX_PATH];
-                    char *fromfile;
-                    int lenPTo;
-                    if ( ! destisdir) {
-                        TRACE("   creating directory %s\n",pTo);
-                        SHCreateDirectory(NULL,pTo);
-                    }
-                    lenPTo = strlen(pTo);
-                    while(1) {
-		        HANDLE hFind;
-		        WIN32_FIND_DATAA wfd;
-
-                        if(!pFrom[0]) break;
-                        TRACE("   From Pattern='%s'\n", pFrom);
-			if(INVALID_HANDLE_VALUE != (hFind = FindFirstFileA(pFrom, &wfd)))
-			{
-			  do
-			  {
-			    if(strcasecmp(wfd.cFileName, ".") && strcasecmp(wfd.cFileName, ".."))
-			    {
-			      strcpy(szTempFrom, pFrom);
-
-                              pTempTo = HeapAlloc(GetProcessHeap(), 0,
-                                                  lenPTo + strlen(wfd.cFileName) + 5);
-                              if (pTempTo) {
-                                  strcpy(pTempTo,pTo);
-                                  PathAddBackslashA(pTempTo);
-                                  strcat(pTempTo,wfd.cFileName);
-
-                                  fromfile = PathFindFileNameA(szTempFrom);
-                                  fromfile[0] = '\0';
-                                  PathAddBackslashA(szTempFrom);
-                                  strcat(szTempFrom, wfd.cFileName);
-                                  TRACE("   From='%s' To='%s'\n", szTempFrom, pTempTo);
-                                  if(lpFileOp->wFunc == FO_COPY)
-                                  {
-                                      if(FILE_ATTRIBUTE_DIRECTORY & wfd.dwFileAttributes)
-                                      {
-                                          /* copy recursively */
-                                          if(!(lpFileOp->fFlags & FOF_FILESONLY))
-                                          {
-                                              SHFILEOPSTRUCTA shfo;
-
-                                              SHCreateDirectory(NULL,pTempTo);
-                                              PathAddBackslashA(szTempFrom);
-                                              strcat(szTempFrom, "*.*");
-                                              szTempFrom[strlen(szTempFrom) + 1] = '\0';
-                                              pTempTo[strlen(pTempTo) + 1] = '\0';
-                                              memcpy(&shfo, lpFileOp, sizeof(shfo));
-                                              shfo.pFrom = szTempFrom;
-                                              shfo.pTo = pTempTo;
-                                              SHFileOperationA(&shfo);
-
-                                              szTempFrom[strlen(szTempFrom) - 4] = '\0';
-                                          }
-                                      }
-                                      else
-                                          CopyFileA(szTempFrom, pTempTo, FALSE);
-                                  }
-                                  else
-                                  {
-                                      /* move file/directory */
-                                      MoveFileA(szTempFrom, pTempTo);
-                                  }
-                                  HeapFree(GetProcessHeap(), 0, pTempTo);
-                              }
-			    }
-			  } while(FindNextFileA(hFind, &wfd));
-			  FindClose(hFind);
-                        }
-                        else
-                        {
-                            /* can't find file with specified name */
-                            break;
-                        }
-                        pFrom += strlen(pFrom) + 1;
-                    }
-                } else {
-		while(1) {
-			if(!pFrom[0]) break;
-			if(!pTo[0]) break;
-			TRACE("   From='%s' To='%s'\n", pFrom, pTo);
-
-                        pTempTo = HeapAlloc(GetProcessHeap(), 0, strlen(pTo)+1);
-                        if (pTempTo)
-                        {
-                            strcpy( pTempTo, pTo );
-                            PathRemoveFileSpecA(pTempTo);
-                            TRACE("   Creating Directory '%s'\n", pTempTo);
-                            SHCreateDirectory(NULL,pTempTo);
-                            HeapFree(GetProcessHeap(), 0, pTempTo);
-                        }
-                            if (lpFileOp->wFunc == FO_COPY)
-                        CopyFileA(pFrom, pTo, FALSE);
-                            else
-                                MoveFileA(pFrom, pTo);
-
-			pFrom += strlen(pFrom) + 1;
-			pTo += strlen(pTo) + 1;
-		}
-                }
-		TRACE("Setting AnyOpsAborted=FALSE\n");
-		lpFileOp->fAnyOperationsAborted=FALSE;
-		return 0;
-#endif
         }
 
 	case FO_DELETE:
-#ifdef __WIN32OS2__
 		TRACE(__FUNCTION__" FO_DELETE level=%d\n",level);
-// need break at error before change sourcepointer
+/* need break at error before change sourcepointer */ 
 		while(!nlpFileOp.fAnyOperationsAborted && (pFrom+=lenFrom+1)[0]) {
 				lenFrom=strlen(pFrom);
@@ -808,5 +607,5 @@
 					if (DeleteFileA(pFrom)) continue;
 					nlpFileOp.fAnyOperationsAborted=TRUE;
-//					retCode = 0x71;
+/*					retCode = 0x71; */
 					where = 301;
 					break;
@@ -818,9 +617,9 @@
 				if (!(FromAttr & FILE_ATTRIBUTE_DIRECTORY) ) {
 					nlpFileOp.fAnyOperationsAborted=TRUE;
-//					retCode = 0x71;
+/*					retCode = 0x71; */
 					where = 302;
 					break;
 				}
-// is Source an existing directory\*.* ?
+/* is Source an existing directory\*.* ? */
 				if (FromAttr == -1) {
 					PathRemoveFileSpecA(pTempFrom);
@@ -844,5 +643,5 @@
 				lenTempFrom = strlen(pTempFrom);
 				if (lenFrom < lenTempFrom) {
-// Source is without \*.*
+/* Source is without \*.* */
 					pTempFrom[lenTempFrom+1]='\0';
 					nlpFileOp.pFrom = pTempFrom;
@@ -852,5 +651,5 @@
 
 					if (nlpFileOp.fAnyOperationsAborted) {break;}
-// Call SHELL_DeleteDirectoryA ?
+/* Call SHELL_DeleteDirectoryA ? */
 					if (RemoveDirectoryA(pFrom)) continue;
 					nlpFileOp.fAnyOperationsAborted=TRUE;
@@ -896,47 +695,4 @@
 	case 0:
 			break;
-#else
-	{
-		HANDLE		hFind;
-		WIN32_FIND_DATAA wfd;
-		char		szTemp[MAX_PATH];
-		char		*file_name;
-
-		TRACE("File Delete:\n");
-		while(1) {
-			if(!pFrom[0]) break;
-			TRACE("   Pattern='%s'\n", pFrom);
-			if(INVALID_HANDLE_VALUE != (hFind = FindFirstFileA(pFrom, &wfd)))
-			{
-			  do
-			  {
-			    if(strcasecmp(wfd.cFileName, ".") && strcasecmp(wfd.cFileName, ".."))
-			    {
-			      strcpy(szTemp, pFrom);
-			      file_name = PathFindFileNameA(szTemp);
-			      file_name[0] = '\0';
-			      PathAddBackslashA(szTemp);
-			      strcat(szTemp, wfd.cFileName);
-
-			      TRACE("   File='%s'\n", szTemp);
-			      if(FILE_ATTRIBUTE_DIRECTORY & wfd.dwFileAttributes)
-			      {
-			        if(!(lpFileOp->fFlags & FOF_FILESONLY))
-			            SHELL_DeleteDirectoryA(szTemp, FALSE);
-			      }
-			      else
-			        DeleteFileA(szTemp);
-			    }
-			  } while(FindNextFileA(hFind, &wfd));
-
-			  FindClose(hFind);
-			}
-			pFrom += strlen(pFrom) + 1;
-		}
-		TRACE("Setting AnyOpsAborted=FALSE\n");
-		lpFileOp->fAnyOperationsAborted=FALSE;
-		return 0;
-	}
-#endif
         case FO_RENAME:
             TRACE("File Rename:\n");
@@ -944,21 +700,86 @@
             {
                 WARN("Attempt to rename more than one file\n");
-                return 1;
+				lpFileOp->fAnyOperationsAborted=TRUE;
+				retCode=0;
+				break;
             }
-            lpFileOp->fAnyOperationsAborted = FALSE;
             TRACE("From %s, To %s\n", pFrom, pTo);
-            return !MoveFileA(pFrom, pTo);
+			pTempFrom = HeapAlloc(GetProcessHeap(), 0, 2 * MAX_PATH+6);
+			pTempTo   = &pTempFrom[MAX_PATH+4];
+
+            FromTyp = SHFileTyp(pFrom, &lenFrom,
+							pTempFrom, &lenTempFrom,
+							&pFromFile,
+							&FromPathAttr, &FromAttr);
+
+			ToTyp = SHFileTyp(pTo, &lenTo,
+							pTempTo, &lenTempTo,
+							&pToFile,
+							&ToPathAttr, &ToAttr);
+
+			TRACE(__FUNCTION__" FO_RENAME level=%d From='%s'(%d,%d,%d) To='%s'(%d,%d,%d)\n",
+				 level, pTempFrom, FromTyp, lenFrom, lenTempFrom, pTempTo, ToTyp, lenTo, lenTempTo);
+
+/* Check Target, Target = Dir is invalid, must be befor the next SourceCheck  */
+			if (FromTyp == TypisDir && ToTyp == TypisDir) {        		
+					nlpFileOp.fAnyOperationsAborted=TRUE;
+					retCode=0x7b;
+					break;
+			} /* endif */
+/* Check Source */
+			if (FromTyp == TypisDirS || FromTyp == TypisName
+/* for (FromTyp == TypisNewPath) to many, all are invalid and not are retCode 0x402  */ 
+			|| (FromTyp == TypisNewPath && (ToTyp != TypisDir && ToTyp != TypisName))) {        		
+					nlpFileOp.fAnyOperationsAborted=TRUE;
+					retCode=0x402;
+					break;
+			} /* endif */
+/* Check Target, Target = NewDir is invalid, must be after 0x402 ? */
+			if (ToTyp == TypisNewPath) {        		
+					nlpFileOp.fAnyOperationsAborted=TRUE;
+					retCode=0x75;
+					break;
+			} /* endif */
+			if (ToTyp == TypisDirS) {        		
+					nlpFileOp.fAnyOperationsAborted=TRUE;
+					retCode=0xb7;
+					break;
+			} /* endif */
+/* What is with existing Target, can we replace it ? */
+			if (((FromTyp == TypisFile || FromTyp == TypisDir) && ToTyp == TypisName)
+			  || (FromTyp == TypisDir && ToTyp == TypisNameS)) {
+				if (ToTyp == TypisNameS) pTempTo[--lenTo] = '\0';
+				lenTempTo = lenTempFrom = 2;
+/* FileRename only in the same path !! ?? */
+				if (FromTyp == TypisFile) {
+					pFromFile = strrchr(pTempFrom,'\\');
+					pToFile = strrchr(pTempTo,'\\');
+					if (pFromFile == NULL || pToFile == NULL) {
+						if (ToTyp == TypisNameS) pTempTo[lenTo++] = '\\';
+						break;
+					}
+					pFromFile[0] = '\0';
+					pToFile[0] = '\0';
+					lenTempTo = strlen(pTempTo);
+					lenTempFrom = strlen(pTempFrom);
+					pFromFile[0] = '\\';
+					pToFile[0] = '\\';
+				}
+				if (lenTempTo == lenTempFrom && 0 == memcmp(pTempTo,pTempFrom,lenTempTo)) {
+    	       		retCode = !MoveFileA(pTempFrom, pTempTo);
+					if (ToTyp == TypisNameS) pTempTo[lenTo++] = '\\';
+					if (retCode) nlpFileOp.fAnyOperationsAborted=TRUE;
+					break;
+				}
+			}
+
+			retCode=0x73;
+			nlpFileOp.fAnyOperationsAborted=TRUE;
+			break;
 
 	default:
-#ifdef __WIN32OS2__
 		TRACE(__FUNCTION__" Unhandled shell file operation %d at level=%d stub\n",(lpFileOp->wFunc & 15), level );
 		lpFileOp->fAnyOperationsAborted=TRUE;
-#else
-		FIXME("Unhandled shell file operation %d\n", lpFileOp->wFunc);
-	}
-#endif
-	   return 1;
-
-#ifdef __WIN32OS2__
+	return 1;
 	}
 	if (pTempFrom) HeapFree(GetProcessHeap(), 0, pTempFrom);
@@ -981,14 +802,13 @@
 	return 0;
 
-#endif
 }
 
 /*************************************************************************
- * SHFileOperationW				[SHELL32.244]
+ * SHFileOperationW				[SHELL32.@]
  *
  * NOTES
  *     exported by name
  */
-DWORD WINAPI SHFileOperationW (LPSHFILEOPSTRUCTW lpFileOp)   
+DWORD WINAPI SHFileOperationW (LPSHFILEOPSTRUCTW lpFileOp)
 {
 	FIXME("(%p):stub.\n", lpFileOp);
@@ -997,5 +817,5 @@
 
 /*************************************************************************
- * SHFileOperation				[SHELL32.242]
+ * SHFileOperation				[SHELL32.@]
  *
  */
@@ -1036,3 +856,2 @@
 }
 
-
