Index: trunk/src/shell32/resources/shell32_Ca.orc
===================================================================
--- trunk/src/shell32/resources/shell32_Ca.orc	(revision 10308)
+++ trunk/src/shell32/resources/shell32_Ca.orc	(revision 10314)
@@ -1,5 +1,20 @@
-/* $Id: shell32_Ca.orc,v 1.1 2002-06-08 07:26:59 sandervl Exp $ */
+/* $Id: shell32_Ca.orc,v 1.2 2003-11-12 14:04:53 sandervl Exp $ */
 LANGUAGE LANG_CATALAN, SUBLANG_DEFAULT
 
+#if 1
+SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 216, 170
+STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
+CAPTION "Quant a %s"
+FONT 10, "System"
+{
+ DEFPUSHBUTTON "D'Acord", IDOK, 156, 147, 50, 12, WS_TABSTOP
+ LISTBOX 99, 8, 85, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER
+ ICON "", 1088, 189, 50, 14, 16
+ LTEXT "", 100, 8, 50, 137, 33
+ LTEXT "Odin ha estat construit per:", 98, 8, 75, 90, 10
+ LTEXT "", 2002, 100, 75, 90, 10
+ CONTROL "",2001,"Static",SS_BITMAP,8,2,148,26
+}
+#else
 SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 210, 152
 STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
@@ -13,3 +28,4 @@
  LTEXT "Odin ha estat construit per:", 98, 8, 55, 137, 10
 }
+#endif
 
Index: trunk/src/shell32/resources/shell32_Cs.orc
===================================================================
--- trunk/src/shell32/resources/shell32_Cs.orc	(revision 10308)
+++ trunk/src/shell32/resources/shell32_Cs.orc	(revision 10314)
@@ -1,5 +1,20 @@
-/* $Id: shell32_Cs.orc,v 1.1 2002-06-08 07:26:59 sandervl Exp $ */
+/* $Id: shell32_Cs.orc,v 1.2 2003-11-12 14:04:53 sandervl Exp $ */
 LANGUAGE LANG_CZECH, SUBLANG_DEFAULT
 
+#if 1
+SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 216, 170
+STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
+CAPTION "O aplikaci %s"
+FONT 10, "System"
+{
+ DEFPUSHBUTTON "OK", IDOK, 156, 147, 50, 12, WS_TABSTOP
+ LISTBOX 99, 8, 85, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER
+ ICON "", 1088, 189, 50, 14, 16
+ LTEXT "", 100, 8, 50, 137, 33
+ LTEXT "Odin was brought to you by:", 98, 8, 75, 90, 10
+ LTEXT "", 2002, 100, 75, 90, 10
+ CONTROL "",2001,"Static",SS_BITMAP,8,2,148,26
+}
+#else
 SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 210, 152
 STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
@@ -13,3 +28,4 @@
  LTEXT "Odin was brought to you by:", 98, 8, 55, 137, 10
 }
+#endif
 
Index: trunk/src/shell32/resources/shell32_Da.orc
===================================================================
--- trunk/src/shell32/resources/shell32_Da.orc	(revision 10308)
+++ trunk/src/shell32/resources/shell32_Da.orc	(revision 10314)
@@ -1,5 +1,20 @@
-/* $Id: shell32_Da.orc,v 1.1 2002-06-08 07:26:59 sandervl Exp $ */
+/* $Id: shell32_Da.orc,v 1.2 2003-11-12 14:04:53 sandervl Exp $ */
 LANGUAGE LANG_DANISH, SUBLANG_DEFAULT
 
+#if 1
+SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 216, 170
+STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
+CAPTION "Om %s"
+FONT 10, "System"
+{
+ DEFPUSHBUTTON "OK", IDOK, 156, 147, 50, 12, WS_TABSTOP
+ LISTBOX 99, 8, 85, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER
+ ICON "", 1088, 189, 50, 14, 16
+ LTEXT "", 100, 8, 50, 137, 33
+ LTEXT "Odin havde ikke været mulig uden hjælp fra disse personer:", 98, 8, 75, 90, 10
+ LTEXT "", 2002, 100, 75, 90, 10
+ CONTROL "",2001,"Static",SS_BITMAP,8,2,148,26
+}
+#else
 SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 210, 152
 STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
@@ -13,3 +28,4 @@
  LTEXT "Odin havde ikke været mulig uden hjælp fra disse personer:", 98, 8, 55, 137, 10
 }
+#endif
 
Index: trunk/src/shell32/resources/shell32_De.orc
===================================================================
--- trunk/src/shell32/resources/shell32_De.orc	(revision 10308)
+++ trunk/src/shell32/resources/shell32_De.orc	(revision 10314)
@@ -1,5 +1,20 @@
-/* $Id: shell32_De.orc,v 1.1 2002-06-08 07:27:00 sandervl Exp $ */
+/* $Id: shell32_De.orc,v 1.2 2003-11-12 14:04:53 sandervl Exp $ */
 LANGUAGE LANG_GERMAN, SUBLANG_DEFAULT
 
+#if 1
+SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 216, 170
+STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
+CAPTION "Info über %s"
+FONT 10, "System"
+{
+ DEFPUSHBUTTON "OK", IDOK, 156, 147, 50, 12, WS_TABSTOP
+ LISTBOX 99, 8, 85, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER
+ ICON "", 1088, 189, 50, 14, 16
+ LTEXT "", 100, 8, 50, 137, 33
+ LTEXT "Odin wurde entwickelt von:", 98, 8, 75, 90, 10
+ LTEXT "", 2002, 100, 75, 90, 10
+ CONTROL "",2001,"Static",SS_BITMAP,8,2,148,26
+}
+#else
 SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 210, 152
 STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
@@ -13,3 +28,34 @@
  LTEXT "Odin wurde entwickelt von:", 98, 8, 55, 137, 10
 }
+#endif
 
+STRINGTABLE DISCARDABLE
+{
+    IDS_ABOUTBOX            "&About FolderPicker Test"
+    IDS_DOCUMENTFOLDERS     "Dokumenten Ordner"
+    IDS_PERSONAL            "Meine Dokumente"
+    IDS_FAVORITES           "Meine Favoriten"
+    IDS_PATH                "System Path"
+    IDS_DESKTOP             "Arbeitsplatz"
+    IDS_FONTS               "Fonts"
+    IDS_MYCOMPUTER          "Mein Computer"
+    IDS_SYSTEMFOLDERS       "System Ordner"
+    IDS_LOCALHARDRIVES      "Lokal Festplatten"
+    IDS_FILENOTFOUND        "Datei nicht gefunden"
+    IDS_35FLOPPY            "3.5 disk"
+    IDS_525FLOPPY           "5.25 disk"
+}
+
+STRINGTABLE DISCARDABLE
+{
+	IDS_CREATEFOLDER_DENIED "Kann den neuen Ordner nicht anlegen: Zugriff abgelehnt."
+	IDS_CREATEFOLDER_CAPTION "Fehler beim Ordneranlegen"
+	IDS_DELETEITEM_CAPTION "Bestätige Löschen der Datei"
+	IDS_DELETEFOLDER_CAPTION "Bestätige Löschen des Ordners"
+	IDS_DELETEITEM_TEXT "Sind Sie sicher, daß Sie '%1' löschen möchten?"
+	IDS_DELETEMULTIPLE_TEXT "Are you sure you want to delete these %1 items?"
+	IDS_OVERWRITEFILE_TEXT "Soll Datei '%1' überschrieben werden?"
+	IDS_OVERWRITEFILE_CAPTION "Bestätigen Sie das Überschreiben der Datei"
+    IDS_COPY_X_OF_TEXT "Kopie%svon %s"
+}
+
Index: trunk/src/shell32/resources/shell32_En.orc
===================================================================
--- trunk/src/shell32/resources/shell32_En.orc	(revision 10308)
+++ trunk/src/shell32/resources/shell32_En.orc	(revision 10314)
@@ -1,3 +1,3 @@
-/* $Id: shell32_En.orc,v 1.2 2002-06-11 06:30:56 sandervl Exp $ */
+/* $Id: shell32_En.orc,v 1.3 2003-11-12 14:04:53 sandervl Exp $ */
 LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT
 
@@ -81,3 +81,19 @@
     IDS_525FLOPPY           "5.25 disk"
 }
+#if 0
+STRINGTABLE DISCARDABLE
+{
+	IDS_CREATEFOLDER_DENIED "Can not create new Folder: Permission denied."
+	IDS_CREATEFOLDER_CAPTION "Error during creating a new folder"
+	IDS_DELETEITEM_CAPTION "Confirm file delete"
+	IDS_DELETEFOLDER_CAPTION "Confirm folder delete"
+	IDS_DELETEITEM_TEXT "Are you sure you want to delete '%1'?"
+	IDS_DELETEMULTIPLE_TEXT "Are you sure you want to delete these %1 items?"
+#ifdef __WIN32OS2__
+	IDS_OVERWRITEFILE_TEXT "OverWrite File %1?"
+	IDS_OVERWRITEFILE_CAPTION "Confirm File OverWrite"
+    IDS_COPY_X_OF_TEXT "Copy () of "
+#endif
+}
+#endif
 
Index: trunk/src/shell32/resources/shell32_Eo.orc
===================================================================
--- trunk/src/shell32/resources/shell32_Eo.orc	(revision 10308)
+++ trunk/src/shell32/resources/shell32_Eo.orc	(revision 10314)
@@ -1,5 +1,20 @@
-/* $Id: shell32_Eo.orc,v 1.1 2002-06-08 07:27:00 sandervl Exp $ */
+/* $Id: shell32_Eo.orc,v 1.2 2003-11-12 14:04:53 sandervl Exp $ */
 LANGUAGE LANG_ESPERANTO, SUBLANG_DEFAULT
 
+#if 1
+SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 216, 170
+STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
+CAPTION "Pri %s"
+FONT 10, "System"
+{
+ DEFPUSHBUTTON "OK", IDOK, 156, 147, 50, 12, WS_TABSTOP
+ LISTBOX 99, 8, 85, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER
+ ICON "", 1088, 189, 50, 14, 16
+ LTEXT "", 100, 8, 50, 137, 33
+ LTEXT "Odin was brought to you by:", 98, 8, 75, 90, 10
+ LTEXT "", 2002, 100, 75, 90, 10
+ CONTROL "",2001,"Static",SS_BITMAP,8,2,148,26
+}
+#else
 SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 210, 152
 STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
@@ -13,3 +28,4 @@
  LTEXT "Odin was brought to you by:", 98, 8, 55, 137, 10
 }
+#endif
 
Index: trunk/src/shell32/resources/shell32_Es.orc
===================================================================
--- trunk/src/shell32/resources/shell32_Es.orc	(revision 10308)
+++ trunk/src/shell32/resources/shell32_Es.orc	(revision 10314)
@@ -1,5 +1,20 @@
-/* $Id: shell32_Es.orc,v 1.1 2002-06-08 07:27:00 sandervl Exp $ */
+/* $Id: shell32_Es.orc,v 1.2 2003-11-12 14:04:54 sandervl Exp $ */
 LANGUAGE LANG_SPANISH, SUBLANG_DEFAULT
 
+#if 1
+SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 216, 170
+STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
+CAPTION "Acerca de %s"
+FONT 10, "System"
+{
+ DEFPUSHBUTTON "OK", IDOK, 156, 147, 50, 12, WS_TABSTOP
+ LISTBOX 99, 8, 85, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER
+ ICON "", 1088, 189, 50, 14, 16
+ LTEXT "", 100, 8, 50, 137, 33
+ LTEXT "Odin es disponible gracias a:", 98, 8, 75, 90, 10
+ LTEXT "", 2002, 100, 75, 90, 10
+ CONTROL "",2001,"Static",SS_BITMAP,8,2,148,26
+}
+#else
 SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 210, 152
 STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
@@ -13,3 +28,4 @@
  LTEXT "Odin es disponible gracias a:", 98, 8, 55, 137, 10
 }
+#endif
 
Index: trunk/src/shell32/resources/shell32_Fi.orc
===================================================================
--- trunk/src/shell32/resources/shell32_Fi.orc	(revision 10308)
+++ trunk/src/shell32/resources/shell32_Fi.orc	(revision 10314)
@@ -1,5 +1,20 @@
-/* $Id: shell32_Fi.orc,v 1.1 2002-06-08 07:27:00 sandervl Exp $ */
+/* $Id: shell32_Fi.orc,v 1.2 2003-11-12 14:04:54 sandervl Exp $ */
 LANGUAGE LANG_FINNISH, SUBLANG_DEFAULT
 
+#if 1
+SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 216, 170
+STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
+CAPTION "Tietoja: %s"
+FONT 10, "Järjestelmä"
+{
+ DEFPUSHBUTTON "OK", IDOK, 156, 147, 50, 12, WS_TABSTOP
+ LISTBOX 99, 8, 85, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER
+ ICON "", 1088, 189, 50, 14, 16
+ LTEXT "", 100, 8, 50, 137, 33
+ LTEXT "Odin:n tekijät:", 98, 8, 75, 90, 10
+ LTEXT "", 2002, 100, 75, 90, 10
+ CONTROL "",2001,"Static",SS_BITMAP,8,2,148,26
+}
+#else
 SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 210, 152
 STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
@@ -13,3 +28,4 @@
  LTEXT "Odin:n tekijät:", 98, 8, 55, 137, 10
 }
+#endif
 
Index: trunk/src/shell32/resources/shell32_Fr.orc
===================================================================
--- trunk/src/shell32/resources/shell32_Fr.orc	(revision 10308)
+++ trunk/src/shell32/resources/shell32_Fr.orc	(revision 10314)
@@ -1,5 +1,20 @@
-/* $Id: shell32_Fr.orc,v 1.1 2002-06-08 07:27:00 sandervl Exp $ */
+/* $Id: shell32_Fr.orc,v 1.2 2003-11-12 14:04:54 sandervl Exp $ */
 LANGUAGE LANG_FRENCH, SUBLANG_DEFAULT
 
+#if 1
+SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 216, 170
+STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
+CAPTION "A propos de %s"
+FONT 10, "System"
+{
+ DEFPUSHBUTTON "OK", IDOK, 156, 147, 50, 12, WS_TABSTOP
+ LISTBOX 99, 8, 85, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER
+ ICON "", 1088, 189, 50, 14, 16
+ LTEXT "", 100, 8, 50, 137, 33
+ LTEXT "Odin est une ralisation de:", 98, 8, 75, 90, 10
+ LTEXT "", 2002, 100, 75, 90, 10
+ CONTROL "",2001,"Static",SS_BITMAP,8,2,148,26
+}
+#else
 SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 210, 152
 STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
@@ -13,3 +28,4 @@
  LTEXT "Odin est une ralisation de:", 98, 8, 55, 137, 10
 }
+#endif
 
Index: trunk/src/shell32/resources/shell32_Hu.orc
===================================================================
--- trunk/src/shell32/resources/shell32_Hu.orc	(revision 10308)
+++ trunk/src/shell32/resources/shell32_Hu.orc	(revision 10314)
@@ -1,5 +1,20 @@
-/* $Id: shell32_Hu.orc,v 1.1 2002-06-08 07:27:00 sandervl Exp $ */
+/* $Id: shell32_Hu.orc,v 1.2 2003-11-12 14:04:54 sandervl Exp $ */
 LANGUAGE LANG_HUNGARIAN, SUBLANG_DEFAULT
 
+#if 1
+SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 216, 170
+STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
+CAPTION "A %s-rõl"
+FONT 10, "System"
+{
+ DEFPUSHBUTTON "OK", IDOK, 156, 147, 50, 12, WS_TABSTOP
+ LISTBOX 99, 8, 85, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER
+ ICON "", 1088, 189, 50, 14, 16
+ LTEXT "", 100, 8, 50, 137, 33
+ LTEXT "Odin was brought to you by:", 98, 8, 75, 90, 10
+ LTEXT "", 2002, 100, 75, 90, 10
+ CONTROL "",2001,"Static",SS_BITMAP,8,2,148,26
+}
+#else
 SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 210, 152
 STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
@@ -13,3 +28,4 @@
  LTEXT "Odin was brought to you by:", 98, 8, 55, 137, 10
 }
+#endif
 
Index: trunk/src/shell32/resources/shell32_It.orc
===================================================================
--- trunk/src/shell32/resources/shell32_It.orc	(revision 10308)
+++ trunk/src/shell32/resources/shell32_It.orc	(revision 10314)
@@ -1,5 +1,20 @@
-/* $Id: shell32_It.orc,v 1.1 2002-06-08 07:27:01 sandervl Exp $ */
+/* $Id: shell32_It.orc,v 1.2 2003-11-12 14:04:54 sandervl Exp $ */
 LANGUAGE LANG_ITALIAN, SUBLANG_DEFAULT
 
+#if 1
+SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 216, 170
+STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
+CAPTION "Informazioni su %s"
+FONT 10, "System"
+{
+ DEFPUSHBUTTON "OK", IDOK, 156, 147, 50, 12, WS_TABSTOP
+ LISTBOX 99, 8, 85, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER
+ ICON "", 1088, 189, 50, 14, 16
+ LTEXT "", 100, 8, 50, 137, 33
+ LTEXT "Odin was brought to you by:", 98, 8, 75, 90, 10
+ LTEXT "", 2002, 100, 75, 90, 10
+ CONTROL "",2001,"Static",SS_BITMAP,8,2,148,26
+}
+#else
 SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 210, 152
 STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
@@ -13,3 +28,4 @@
  LTEXT "Odin was brought to you by:", 98, 8, 55, 137, 10
 }
+#endif
 
Index: trunk/src/shell32/resources/shell32_Nl.orc
===================================================================
--- trunk/src/shell32/resources/shell32_Nl.orc	(revision 10308)
+++ trunk/src/shell32/resources/shell32_Nl.orc	(revision 10314)
@@ -1,5 +1,20 @@
-/* $Id: shell32_Nl.orc,v 1.1 2002-06-08 07:27:01 sandervl Exp $ */
+/* $Id: shell32_Nl.orc,v 1.2 2003-11-12 14:04:54 sandervl Exp $ */
 LANGUAGE LANG_DUTCH, SUBLANG_DEFAULT
 
+#if 1
+SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 216, 170
+STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
+CAPTION "Info %s"
+FONT 10, "System"
+{
+ DEFPUSHBUTTON "OK", IDOK, 156, 147, 50, 12, WS_TABSTOP
+ LISTBOX 99, 8, 85, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER
+ ICON "", 1088, 189, 50, 14, 16
+ LTEXT "", 100, 8, 50, 137, 33
+ LTEXT "Odin is geschreven door:", 98, 8, 75, 90, 10
+ LTEXT "", 2002, 100, 75, 90, 10
+ CONTROL "",2001,"Static",SS_BITMAP,8,2,148,26
+}
+#else
 SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 210, 152
 STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
@@ -13,3 +28,4 @@
  LTEXT "Odin is geschreven door:", 98, 8, 55, 137, 10
 }
+#endif
 
Index: trunk/src/shell32/resources/shell32_No.orc
===================================================================
--- trunk/src/shell32/resources/shell32_No.orc	(revision 10308)
+++ trunk/src/shell32/resources/shell32_No.orc	(revision 10314)
@@ -1,5 +1,20 @@
-/* $Id: shell32_No.orc,v 1.1 2002-06-08 07:27:01 sandervl Exp $ */
+/* $Id: shell32_No.orc,v 1.2 2003-11-12 14:04:54 sandervl Exp $ */
 LANGUAGE LANG_NORWEGIAN, SUBLANG_DEFAULT
 
+#if 1
+SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 216, 170
+STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
+CAPTION "Om %s"
+FONT 10, "System"
+{
+ DEFPUSHBUTTON "OK", IDOK, 156, 147, 50, 12, WS_TABSTOP
+ LISTBOX 99, 8, 85, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER
+ ICON "", 1088, 189, 50, 14, 16
+ LTEXT "", 100, 8, 50, 137, 33
+ LTEXT "Odin was brought to you by:", 98, 8, 75, 90, 10
+ LTEXT "", 2002, 100, 75, 90, 10
+ CONTROL "",2001,"Static",SS_BITMAP,8,2,148,26
+}
+#else
 SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 210, 152
 STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
@@ -13,3 +28,4 @@
  LTEXT "Odin was brought to you by:", 98, 8, 55, 137, 10
 }
+#endif
 
Index: trunk/src/shell32/resources/shell32_Pl.orc
===================================================================
--- trunk/src/shell32/resources/shell32_Pl.orc	(revision 10308)
+++ trunk/src/shell32/resources/shell32_Pl.orc	(revision 10314)
@@ -1,5 +1,20 @@
-/* $Id: shell32_Pl.orc,v 1.1 2002-06-08 07:27:01 sandervl Exp $ */
+/* $Id: shell32_Pl.orc,v 1.2 2003-11-12 14:04:54 sandervl Exp $ */
 LANGUAGE LANG_POLISH, SUBLANG_DEFAULT
 
+#if 1
+SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 216, 170
+STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
+CAPTION "O %s"
+FONT 10, "System"
+{
+ DEFPUSHBUTTON "OK", IDOK, 156, 147, 50, 12, WS_TABSTOP
+ LISTBOX 99, 8, 85, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER
+ ICON "", 1088, 189, 50, 14, 16
+ LTEXT "", 100, 8, 50, 137, 33
+ LTEXT "Odin was brought to you by:", 98, 8, 75, 90, 10
+ LTEXT "", 2002, 100, 75, 90, 10
+ CONTROL "",2001,"Static",SS_BITMAP,8,2,148,26
+}
+#else
 SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 210, 152
 STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
@@ -13,3 +28,4 @@
  LTEXT "Odin was brought to you by:", 98, 8, 55, 137, 10
 }
+#endif
 
Index: trunk/src/shell32/resources/shell32_Pt.orc
===================================================================
--- trunk/src/shell32/resources/shell32_Pt.orc	(revision 10308)
+++ trunk/src/shell32/resources/shell32_Pt.orc	(revision 10314)
@@ -1,5 +1,20 @@
-/* $Id: shell32_Pt.orc,v 1.1 2002-06-08 07:27:01 sandervl Exp $ */
+/* $Id: shell32_Pt.orc,v 1.2 2003-11-12 14:04:55 sandervl Exp $ */
 LANGUAGE LANG_PORTUGUESE, SUBLANG_DEFAULT
 
+#if 1
+SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 216, 170
+STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
+CAPTION "Sobre %s"
+FONT 10, "System"
+{
+ DEFPUSHBUTTON "OK", IDOK, 156, 147, 50, 12, WS_TABSTOP
+ LISTBOX 99, 8, 85, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER
+ ICON "", 1088, 189, 50, 14, 16
+ LTEXT "", 100, 8, 50, 137, 33
+ LTEXT "Odin foi disponibilizado por:", 98, 8, 75, 90, 10
+ LTEXT "", 2002, 100, 75, 90, 10
+ CONTROL "",2001,"Static",SS_BITMAP,8,2,148,26
+}
+#else
 SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 210, 152
 STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
@@ -13,4 +28,5 @@
  LTEXT "Odin foi disponibilizado por:", 98, 8, 55, 137, 10
 }
+#endif
 
 
Index: trunk/src/shell32/resources/shell32_Ru.orc
===================================================================
--- trunk/src/shell32/resources/shell32_Ru.orc	(revision 10308)
+++ trunk/src/shell32/resources/shell32_Ru.orc	(revision 10314)
@@ -1,5 +1,20 @@
-/* $Id: shell32_Ru.orc,v 1.1 2002-06-08 07:27:01 sandervl Exp $ */
+/* $Id: shell32_Ru.orc,v 1.2 2003-11-12 14:04:55 sandervl Exp $ */
 LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
 
+#if 1
+SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 216, 170
+STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
+CAPTION "Î %s"
+FONT 10, "System"
+{
+ DEFPUSHBUTTON "OK", IDOK, 156, 147, 50, 12, WS_TABSTOP
+ LISTBOX 99, 8, 85, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER
+ ICON "", 1088, 189, 50, 14, 16
+ LTEXT "", 100, 8, 50, 137, 33
+ LTEXT "Ðàçðàáîò÷èêè Odin :", 98, 8, 75, 90, 10
+ LTEXT "", 2002, 100, 75, 90, 10
+ CONTROL "",2001,"Static",SS_BITMAP,8,2,148,26
+}
+#else
 SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 210, 152
 STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
@@ -13,3 +28,4 @@
  LTEXT "Ðàçðàáîò÷èêè Odin :", 98, 8, 55, 137, 10
 }
+#endif
 
Index: trunk/src/shell32/resources/shell32_Sv.orc
===================================================================
--- trunk/src/shell32/resources/shell32_Sv.orc	(revision 10308)
+++ trunk/src/shell32/resources/shell32_Sv.orc	(revision 10314)
@@ -1,5 +1,20 @@
-/* $Id: shell32_Sv.orc,v 1.1 2002-06-08 07:27:02 sandervl Exp $ */
+/* $Id: shell32_Sv.orc,v 1.2 2003-11-12 14:04:55 sandervl Exp $ */
 LANGUAGE LANG_SWEDISH, SUBLANG_DEFAULT
 
+#if 1
+SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 216, 170
+STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
+CAPTION "Om %s"
+FONT 10, "System"
+{
+ DEFPUSHBUTTON "OK", IDOK, 156, 147, 50, 12, WS_TABSTOP
+ LISTBOX 99, 8, 85, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER
+ ICON "", 1088, 189, 50, 14, 16
+ LTEXT "", 100, 8, 50, 137, 33
+ LTEXT "Odin hade inte varit möjligt utan dessa personer:", 98, 8, 75, 90, 10
+ LTEXT "", 2002, 100, 75, 90, 10
+ CONTROL "",2001,"Static",SS_BITMAP,8,2,148,26
+}
+#else
 SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 210, 152
 STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
@@ -13,3 +28,4 @@
  LTEXT "Odin hade inte varit möjligt utan dessa personer:", 98, 8, 55, 137, 10
 }
+#endif
 
Index: trunk/src/shell32/resources/shell32_Wa.orc
===================================================================
--- trunk/src/shell32/resources/shell32_Wa.orc	(revision 10308)
+++ trunk/src/shell32/resources/shell32_Wa.orc	(revision 10314)
@@ -1,3 +1,3 @@
-/* $Id: shell32_Wa.orc,v 1.1 2002-06-08 07:27:02 sandervl Exp $ */
+/* $Id: shell32_Wa.orc,v 1.2 2003-11-12 14:04:55 sandervl Exp $ */
 LANGUAGE LANG_WALON, SUBLANG_DEFAULT
 
@@ -7,4 +7,19 @@
  */
 
+#if 1
+SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 216, 170
+STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
+CAPTION "Å dfait di %s"
+FONT 10, "System"
+{
+ DEFPUSHBUTTON "OK", IDOK, 156, 147, 50, 12, WS_TABSTOP
+ LISTBOX 99, 8, 85, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER
+ ICON "", 1088, 189, 50, 14, 16
+ LTEXT "", 100, 8, 50, 137, 33
+ LTEXT "Odin a estu fwait par:", 98, 8, 75, 90, 10
+ LTEXT "", 2002, 100, 75, 90, 10
+ CONTROL "",2001,"Static",SS_BITMAP,8,2,148,26
+}
+#else
 SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 210, 152
 STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
@@ -18,3 +33,4 @@
  LTEXT "Odin a estu fwait par:", 98, 8, 55, 137, 10
 }
+#endif
 
Index: trunk/src/shell32/sh.cpp
===================================================================
--- trunk/src/shell32/sh.cpp	(revision 10308)
+++ trunk/src/shell32/sh.cpp	(revision 10314)
@@ -1,3 +1,3 @@
-/* $Id: sh.cpp,v 1.15 2002-06-07 08:21:43 sandervl Exp $ */
+/* $Id: sh.cpp,v 1.16 2003-11-12 14:05:13 sandervl Exp $ */
 
 /*
@@ -132,24 +132,4 @@
 
 /*****************************************************************************
- * Name      : DWORD SHFreeNameMappings
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : SHELL32.246
- * Status    : UNTESTED STUB UNKNOWN
- *
- * Author    : Patrick Haller [Tue, 1998/06/15 03:00]
- *****************************************************************************/
-
-DWORD WIN32API SHFreeNameMappings(DWORD x1)
-{
-  dprintf(("SHELL32: SHFreeNameMappings not implemented.\n"));
-
-  return 0;
-}
-
-
-/*****************************************************************************
  * Name      : DWORD SHGetNewLinkInfo
  * Purpose   :
Index: trunk/src/shell32/shlfileop.c
===================================================================
--- trunk/src/shell32/shlfileop.c	(revision 10308)
+++ trunk/src/shell32/shlfileop.c	(revision 10314)
@@ -4,6 +4,6 @@
  * Copyright 2000 Juergen Schmied
  * Copyright 2002 Andriy Palamarchuk
- * Copyright 2002 Dietrich Teickner (from Odin)
- * Copyright 2002 Rolf Kalbermatter
+ * Copyright 2002-2003 Dietrich Teickner (from Odin)
+ * Copyright 2002-2003 Rolf Kalbermatter
  *
  * This library is free software; you can redistribute it and/or
@@ -22,5 +22,5 @@
  *
  * !!! shlfileop.c is shared source between wine and odin, do not remove
- * #ifdef __win32os2__ .. lines
+ * #ifdef __WIN32OS2__ .. lines
  */
 
@@ -28,9 +28,14 @@
 #include "wine/port.h"
 
+#include <stdarg.h>
 #include <string.h>
 #include <ctype.h>
 
+#include "windef.h"
+#include "winbase.h"
 #include "winreg.h"
 #include "shellapi.h"
+#include "wingdi.h"
+#include "winuser.h"
 #include "shlobj.h"
 #include "shresdef.h"
@@ -44,10 +49,7 @@
 WINE_DEFAULT_DEBUG_CHANNEL(shell);
 
-#define W98_FO_FUNCTION /* makes shlfileop W98-like */ 
-#undef W98_FO_FUNCTION /* makes shlfileop W2K-like */
-#define W98_FO_FUNCTION /* makes shlfileop W98-like */ 
-
-#define IsAttribFile(x) (!(x & FILE_ATTRIBUTE_DIRECTORY))
-#define IsAttribDir(x)  (!(x == -1) && (x & FILE_ATTRIBUTE_DIRECTORY))
+#define IsAttribFile(x) (!((x) & FILE_ATTRIBUTE_DIRECTORY))
+#define IsAttrib(x,y)   ((INVALID_FILE_ATTRIBUTES != (x)) && ((x) & (y)))
+#define IsAttribDir(x)  IsAttrib(x,FILE_ATTRIBUTE_DIRECTORY)
 
 #define IsDotDir(x)     ((x[0] == '.') && ((x[1] == 0) || ((x[1] == '.') && (x[2] == 0))))
@@ -57,17 +59,23 @@
 #define HIGH_ADR (LPWSTR)0xffffffff
 
-CHAR aWildcardFile[] = {'*','.','*',0};
+#define FOI_NeverOverwrite 2
+
+CHAR aWildcardFile[] = {'*',0};
 WCHAR wWildcardChars[] = {'?','*',0};
 #define wWildcardFile &wWildcardChars[1]
 WCHAR wBackslash[] = {'\\',0};
-
-static BOOL SHNotifyCreateDirectoryA(LPCSTR path, LPSECURITY_ATTRIBUTES sec);
-static BOOL SHNotifyCreateDirectoryW(LPCWSTR path, LPSECURITY_ATTRIBUTES sec);
-static BOOL SHNotifyRemoveDirectoryA(LPCSTR path);
-static BOOL SHNotifyRemoveDirectoryW(LPCWSTR path);
-static BOOL SHNotifyDeleteFileA(LPCSTR path);
-static BOOL SHNotifyDeleteFileW(LPCWSTR path);
-static BOOL SHNotifyMoveFileW(LPCWSTR src, LPCWSTR dest);
-static BOOL SHNotifyCopyFileW(LPCWSTR src, LPCWSTR dest, BOOL bRenameIfExists);
+enum { none = 0, w95, w95b, nt351, nt40, w98, w98se, wMe, w2k, wXp};
+static int WOsVers = none; /* for versionsdepended conditions */
+static int retCodeIsInvalid = 0x75; /* w95?,w98se, nt <= 4? */
+static LPCSTR cFO_String [] = {"FO_????","FO_MOVE","FO_COPY","FO_DELETE","FO_RENAME"};
+
+static DWORD SHNotifyCreateDirectoryA(LPCSTR path, LPSECURITY_ATTRIBUTES sec);
+static DWORD SHNotifyCreateDirectoryW(LPCWSTR path, LPSECURITY_ATTRIBUTES sec);
+static DWORD SHNotifyRemoveDirectoryA(LPCSTR path);
+static DWORD SHNotifyRemoveDirectoryW(LPCWSTR path);
+static DWORD SHNotifyDeleteFileA(LPCSTR path);
+static DWORD SHNotifyDeleteFileW(LPCWSTR path);
+static DWORD SHNotifyMoveFileW(LPCWSTR src, LPCWSTR dest);
+static DWORD SHNotifyCopyFileW(LPCWSTR, LPCWSTR, BOOL);
 
 typedef struct
@@ -166,10 +174,10 @@
 	      ret = SHELL_DeleteDirectoryA(szTemp, FALSE);
 	    else
-	      ret = SHNotifyDeleteFileA(szTemp);
+	      ret = (SHNotifyDeleteFileA(szTemp) == ERROR_SUCCESS);
 	  } while (ret && FindNextFileA(hFind, &wfd));
 	}
 	FindClose(hFind);
 	if (ret)
-	  ret = SHNotifyRemoveDirectoryA(pszDir);
+	  ret = (SHNotifyRemoveDirectoryA(pszDir) == ERROR_SUCCESS);
 	return ret;
 }
@@ -189,4 +197,5 @@
 
 	if (!bShowUI || SHELL_ConfirmDialogW(ASK_DELETE_FOLDER, pszDir))
+
 	{
 	  do
@@ -201,10 +210,10 @@
 	      ret = SHELL_DeleteDirectoryW(szTemp, FALSE);
 	    else
-	      ret = SHNotifyDeleteFileW(szTemp);
+	      ret = (SHNotifyDeleteFileW(szTemp) == ERROR_SUCCESS);
 	  } while (ret && FindNextFileW(hFind, &wfd));
 	}
 	FindClose(hFind);
 	if (ret)
-	  ret = SHNotifyRemoveDirectoryW(pszDir);
+	  ret = (SHNotifyRemoveDirectoryW(pszDir) == ERROR_SUCCESS);
 	return ret;
 }
@@ -218,5 +227,5 @@
 	  return FALSE;
 
-	return SHNotifyDeleteFileA(pszFile);
+	return (SHNotifyDeleteFileA(pszFile) == ERROR_SUCCESS);
 }
 
@@ -226,5 +235,5 @@
 	  return FALSE;
 
-	return SHNotifyDeleteFileW(pszFile);
+	return (SHNotifyDeleteFileW(pszFile) == ERROR_SUCCESS);
 }
 
@@ -244,28 +253,34 @@
  *  This is Unicode on NT/2000
  */
-static BOOL SHNotifyCreateDirectoryA(LPCSTR path, LPSECURITY_ATTRIBUTES sec)
-{
-	BOOL ret;
+static DWORD SHNotifyCreateDirectoryA(LPCSTR path, LPSECURITY_ATTRIBUTES sec)
+{
+	WCHAR wPath[MAX_PATH];
 	TRACE("(%s, %p)\n", debugstr_a(path), sec);
 
-	ret = CreateDirectoryA(path, sec);
-	if (ret)
-	{
-	  SHChangeNotify(SHCNE_MKDIR, SHCNF_PATHA, path, NULL);
-	}
-	return ret;
-}
-
-static BOOL SHNotifyCreateDirectoryW(LPCWSTR path, LPSECURITY_ATTRIBUTES sec)
-{
-	BOOL ret;
+	MultiByteToWideChar(CP_ACP, 0, path, -1, wPath, MAX_PATH);
+	return SHNotifyCreateDirectoryW(wPath, sec);
+}
+
+static DWORD SHNotifyCreateDirectoryW(LPCWSTR path, LPSECURITY_ATTRIBUTES sec)
+{
 	TRACE("(%s, %p)\n", debugstr_w(path), sec);
 
-	ret = CreateDirectoryW(path, sec);
-	if (ret)
+	if (StrPBrkW(path, wWildcardChars))
+	{
+	/* FIXME: This test is necessary since our CreateDirectory implementation
+	   does create directories with wildcard chars without objection. Once this
+	   is fixed, this can go away. */
+	  SetLastError(ERROR_INVALID_NAME);
+	  if (w98se >= WOsVers) /* wMe ? */
+	    return ERROR_FILE_NOT_FOUND; /* w98se */
+	  return ERROR_INVALID_NAME; /* w2k */
+	}
+
+	if (CreateDirectoryW(path, sec))
 	{
 	  SHChangeNotify(SHCNE_MKDIR, SHCNF_PATHW, path, NULL);
-	}
-	return ret;
+	  return ERROR_SUCCESS;
+	}
+	return GetLastError();
 }
 
@@ -273,6 +288,6 @@
 {
 	if (SHELL_OsIsUnicode())
-	  return SHNotifyCreateDirectoryW(path, sec);
-	return SHNotifyCreateDirectoryA(path, sec);
+	  return (SHNotifyCreateDirectoryW(path, sec) == ERROR_SUCCESS);
+	return (SHNotifyCreateDirectoryA(path, sec) == ERROR_SUCCESS);
 }
 
@@ -286,5 +301,5 @@
  *
  * RETURNS
- *  TRUE if successful, FALSE otherwise
+ *  ERROR_SUCCESS if successful
  *
  * NOTES:
@@ -292,24 +307,17 @@
  *  This is Unicode on NT/2000
  */
-static BOOL SHNotifyRemoveDirectoryA(LPCSTR path)
-{
-	BOOL ret;
+
+static DWORD SHNotifyRemoveDirectoryA(LPCSTR path)
+{
+	WCHAR wPath[MAX_PATH];
 	TRACE("(%s)\n", debugstr_a(path));
 
-	ret = RemoveDirectoryA(path);
-	if (!ret)
-	{
-	  /* Directory may be write protected */
-	  DWORD dwAttr = GetFileAttributesA(path);
-	  if (dwAttr != -1 && dwAttr & FILE_ATTRIBUTE_READONLY)
-	    if (SetFileAttributesA(path, dwAttr & ~FILE_ATTRIBUTE_READONLY))
-	      ret = RemoveDirectoryA(path);
-	}
-	if (ret)
-	  SHChangeNotify(SHCNE_RMDIR, SHCNF_PATHA, path, NULL);
-	return ret;
-}
-
-static BOOL SHNotifyRemoveDirectoryW(LPCWSTR path)
+	MultiByteToWideChar(CP_ACP, 0, path, -1, wPath, MAX_PATH);
+	return SHNotifyRemoveDirectoryW(wPath);
+}
+
+/***********************************************************************/
+
+static DWORD SHNotifyRemoveDirectoryW(LPCWSTR path)
 {
 	BOOL ret;
@@ -321,18 +329,23 @@
 	  /* Directory may be write protected */
 	  DWORD dwAttr = GetFileAttributesW(path);
-	  if (dwAttr != -1 && dwAttr & FILE_ATTRIBUTE_READONLY)
+	  if (IsAttrib(dwAttr,FILE_ATTRIBUTE_READONLY))
 	    if (SetFileAttributesW(path, dwAttr & ~FILE_ATTRIBUTE_READONLY))
 	      ret = RemoveDirectoryW(path);
 	}
 	if (ret)
+	{
 	  SHChangeNotify(SHCNE_RMDIR, SHCNF_PATHW, path, NULL);
-	return ret;
-}
+	  return ERROR_SUCCESS;
+	}
+	return GetLastError();
+}
+
+/***********************************************************************/
 
 BOOL WINAPI Win32RemoveDirectoryAW(LPCVOID path)
 {
 	if (SHELL_OsIsUnicode())
-	  return SHNotifyRemoveDirectoryW(path);
-	return SHNotifyRemoveDirectoryA(path);
+	  return (SHNotifyRemoveDirectoryW(path) == ERROR_SUCCESS);
+	return (SHNotifyRemoveDirectoryA(path) == ERROR_SUCCESS);
 }
 
@@ -352,25 +365,17 @@
  *  This is Unicode on NT/2000
  */
-static BOOL SHNotifyDeleteFileA(LPCSTR path)
-{
-	BOOL ret;
-
+
+static DWORD SHNotifyDeleteFileA(LPCSTR path)
+{
+	WCHAR wPath[MAX_PATH];
 	TRACE("(%s)\n", debugstr_a(path));
 
-	ret = DeleteFileA(path);
-	if (!ret)
-	{
-	  /* File may be write protected or a system file */
-	  DWORD dwAttr = GetFileAttributesA(path);
-	  if ((dwAttr != -1) && (dwAttr & (FILE_ATTRIBUTE_READONLY | FILE_ATTRIBUTE_SYSTEM)))
-	    if (SetFileAttributesA(path, dwAttr & ~(FILE_ATTRIBUTE_READONLY | FILE_ATTRIBUTE_SYSTEM)))
-	      ret = DeleteFileA(path);
-	}
-	if (ret)
-	  SHChangeNotify(SHCNE_DELETE, SHCNF_PATHA, path, NULL);
-	return ret;
-}
-
-static BOOL SHNotifyDeleteFileW(LPCWSTR path)
+	MultiByteToWideChar(CP_ACP, 0, path, -1, wPath, MAX_PATH);
+	return SHNotifyDeleteFileW(wPath);
+}
+
+/***********************************************************************/
+
+static DWORD SHNotifyDeleteFileW(LPCWSTR path)
 {
 	BOOL ret;
@@ -383,18 +388,23 @@
 	  /* File may be write protected or a system file */
 	  DWORD dwAttr = GetFileAttributesW(path);
-	  if ((dwAttr != -1) && (dwAttr & (FILE_ATTRIBUTE_READONLY | FILE_ATTRIBUTE_SYSTEM)))
+	  if (IsAttrib(dwAttr,FILE_ATTRIBUTE_READONLY | FILE_ATTRIBUTE_SYSTEM))
 	    if (SetFileAttributesW(path, dwAttr & ~(FILE_ATTRIBUTE_READONLY | FILE_ATTRIBUTE_SYSTEM)))
 	      ret = DeleteFileW(path);
 	}
 	if (ret)
+	{
 	  SHChangeNotify(SHCNE_DELETE, SHCNF_PATHW, path, NULL);
-	return ret;
-}
+	  return ERROR_SUCCESS;
+	}
+	return GetLastError();
+}
+
+/***********************************************************************/
 
 DWORD WINAPI Win32DeleteFileAW(LPCVOID path)
 {
 	if (SHELL_OsIsUnicode())
-	  return SHNotifyDeleteFileW(path);
-	return SHNotifyDeleteFileA(path);
+	  return (SHNotifyDeleteFileW(path) == ERROR_SUCCESS);
+	return (SHNotifyDeleteFileA(path) == ERROR_SUCCESS);
 }
 
@@ -409,11 +419,22 @@
  *
  * RETURNS
- *  TRUE if successful, FALSE otherwise
- */
-static BOOL SHNotifyMoveFileW(LPCWSTR src, LPCWSTR dest)
-{
-	BOOL ret;
+ *  NO_ERROR if successful, or an error code otherwise
+ */
+static DWORD SHNotifyMoveFileW(LPCWSTR src, LPCWSTR dest)
+{
+	BOOL ret = FALSE;
 
 	TRACE("(%s %s)\n", debugstr_w(src), debugstr_w(dest));
+
+	if (StrPBrkW(dest, wWildcardChars))
+	{
+	  /* FIXME: This test is currently necessary since our MoveFile
+	     implementation does create files with wildcard characters
+	     without objection!! Once this is fixed, this here can go away. */
+	  SetLastError(ERROR_INVALID_NAME);
+	  if (w98se >= WOsVers) /* wMe ? */
+	    return ERROR_FILE_NOT_FOUND; /* w98se */
+	  return ERROR_INVALID_NAME; /* w2k,wXp */
+	}
 
 	ret = MoveFileW(src, dest);
@@ -422,11 +443,14 @@
 	  /* Source file may be write protected or a system file */
 	  DWORD dwAttr = GetFileAttributesW(src);
-	  if ((dwAttr != -1) && (dwAttr & (FILE_ATTRIBUTE_READONLY | FILE_ATTRIBUTE_SYSTEM)))
+	  if (IsAttrib(dwAttr,FILE_ATTRIBUTE_READONLY | FILE_ATTRIBUTE_SYSTEM))
 	    if (SetFileAttributesW(src, dwAttr & ~(FILE_ATTRIBUTE_READONLY | FILE_ATTRIBUTE_SYSTEM)))
 	      ret = MoveFileW(src, dest);
 	}
 	if (ret)
+	{
 	  SHChangeNotify(SHCNE_RENAMEITEM, SHCNF_PATHW, src, dest);
-	return ret;
+	  return ERROR_SUCCESS;
+	}
+	return GetLastError();
 }
 
@@ -439,30 +463,25 @@
  *  src        [I]   path to source file to move
  *  dest       [I]   path to target file to move to
- *  bRename    [I]   if TRUE, the target file will be renamed if a
+ *  b_nOverWrt [I]   if TRUE, the target file will not be overwritten, if a
  *                   file with this name already exists
  *
  * RETURNS
- *  TRUE if successful, FALSE otherwise
- */
-static BOOL SHNotifyCopyFileW(LPCWSTR src, LPCWSTR dest, BOOL bRename)
+ *  NO_ERROR if successful, or an error code otherwise
+ */
+static DWORD SHNotifyCopyFileW(LPCWSTR src, LPCWSTR dest, BOOL b_nOverWrt)
 {
 	BOOL ret;
 
-	TRACE("(%s %s %s)\n", debugstr_w(src), debugstr_w(dest), bRename ? "renameIfExists" : "");
-
-	ret = CopyFileW(src, dest, TRUE);
-	if (!ret && bRename)
-	{
-	  /* Destination file probably exists */
-	  DWORD dwAttr = GetFileAttributesW(dest);
-	  if (dwAttr != -1)
-	  {
-	    FIXME("Rename on copy to existing file not implemented!");
-	  }
-	}
+	TRACE("(%s %s %s)\n", debugstr_w(src), debugstr_w(dest), b_nOverWrt ? "OverWriteIfExists" : "");
+
+	ret = CopyFileW(src, dest, b_nOverWrt);
 	if (ret)
+	{
 	  SHChangeNotify(SHCNE_CREATE, SHCNF_PATHW, dest, NULL);
-	return ret;
-}
+	  return ERROR_SUCCESS;
+	}
+	return GetLastError();
+}
+
 
 /*************************************************************************
@@ -478,5 +497,5 @@
  *  ERRROR_SUCCESS or one of the following values:
  *  ERROR_BAD_PATHNAME if the path is relative
- *  ERROR_FILE_EXISTS when a file with that name exists
+ *  ERROR_INVLID_NAME if the path contains invalid chars
  *  ERROR_ALREADY_EXISTS when the directory already exists
  *  ERROR_FILENAME_EXCED_RANGE if the filename was to long to process
@@ -506,6 +525,7 @@
  * RETURNS
  *  ERRROR_SUCCESS or one of the following values:
- *  ERROR_BAD_PATHNAME if the path is relative
- *  ERROR_FILE_EXISTS when a file with that name exists
+ *  ERROR_BAD_PATHNAME or ERROR_PATH_NOT_FOUND if the path is relative
+ *  ERROR_INVLID_NAME if the path contains invalid chars
+ * ? ERROR_FILE_EXISTS when a file with that name exists
  *  ERROR_ALREADY_EXISTS when the directory already exists
  *  ERROR_FILENAME_EXCED_RANGE if the filename was to long to process
@@ -521,63 +541,98 @@
 
 /*************************************************************************
- * SHTryFind      [intern]
- * Try for existing names
- */
-DWORD SHTryFindW(LPCWSTR pName)
-{
-	WCHAR szName [MAX_PATH + 4];
-	DWORD retCode = ERROR_FILE_NOT_FOUND; 
+ * SHCreateDirectoryExW      [SHELL32.@]
+ */
+DWORD WINAPI SHCreateDirectoryExW(HWND hWnd, LPCWSTR path, LPSECURITY_ATTRIBUTES sec)
+{
+	DWORD ret = ERROR_BAD_PATHNAME;
+	TRACE("(%p, %s, %p)\n",hWnd, debugstr_w(path), sec);
+
+	if (PathIsRelativeW(path))
+	{
+	  SetLastError(ret);
+	}
+	else
+	{
+	  ret = SHNotifyCreateDirectoryW(path, sec);
+	  if (ret && ret != ERROR_FILE_EXISTS &&
+	      ret != ERROR_ALREADY_EXISTS &&
+	      ret != ERROR_FILENAME_EXCED_RANGE)
+	  {
+	  /* handling network file names?
+	    lstrcpynW(pathName, path, MAX_PATH);
+	    lpStr = PathAddBackslashW(pathName);*/
+	    FIXME("Semi-stub, creating path %s, failed with error %ld?\n", debugstr_w(path), ret);
+	  }
+	}
+	return ret;
+}
+
+/*************************************************************************
+ * SHFreeNameMappings      [shell32.246]
+ *
+ * Free the mapping handle returned by SHFileoperation if FOF_WANTSMAPPINGHANDLE
+ * was specified.
+ *
+ * PARAMS
+ *  hNameMapping [I] handle to the name mappings used during renaming of files
+ *
+ */
+void WINAPI SHFreeNameMappings(HANDLE hNameMapping)
+{
+	if (hNameMapping)
+	{
+	  LPSHNAMEMAPPINGW lp;
+	  UINT i = 0;
+
+	  while (NULL != (lp = DSA_GetItemPtr((struct _DSA* const)hNameMapping, i++)))
+	  {
+	    SHFree(lp->pszOldPath);
+	    SHFree(lp->pszNewPath);
+	  }
+	  DSA_Destroy((struct _DSA*)hNameMapping);
+	}
+}
+
+static BOOL SetIfPointer(LPWSTR pToSlash, WCHAR x)
+{
+	if (pToSlash) *pToSlash = x;
+	return (BOOL)pToSlash; 
+}
+/*************************************************************************
+ * SHFindAttrW      [internal]
+ *
+ * Get the Attributes for a file or directory. The difference to GetAttributes()
+ * is that this function will also work for paths containing wildcard characters
+ * in its filename.
+
+ * PARAMS
+ *  path       [I]   path of directory or file to check
+ *  fileOnly   [I]   TRUE if only files should be found
+ *
+ * RETURNS
+ *  INVALID_FILE_ATTRIBUTES if the path does not exist, the actual attributes of
+ *  the first file or directory found otherwise
+ */
+static DWORD SHFindAttrW(LPCWSTR pName, BOOL fileOnly)
+{
 	WIN32_FIND_DATAW wfd;
-	HANDLE  hFind;
-	LPCWSTR pFileName = StrRChrW(pName,NULL,'\\');
-	if ((!pFileName) || \ 
-	  /* we must isolate the part befor '\' */ 
-	  (lstrcpynW(&szName[0],pName,(pFileName-pName)),
-	   NULL != StrPBrkW(&szName[0], wWildcardChars)))
-	{
-	  return ERROR_INVALID_NAME;
-	}
-	hFind = FindFirstFileW(pName, &wfd);
+	BOOL b_FileMask = fileOnly && (NULL != StrPBrkW(pName, wWildcardChars));
+	DWORD dwAttr = INVALID_FILE_ATTRIBUTES;
+	HANDLE hFind = FindFirstFileW(pName, &wfd);
+
+	TRACE("%s %d\n", debugstr_w(pName), fileOnly);
 	if (INVALID_HANDLE_VALUE != hFind)
 	{
+	  do
+	  {
+	    if (b_FileMask && IsAttribDir(wfd.dwFileAttributes))
+	       continue;
+	    dwAttr = wfd.dwFileAttributes;
+	    break;
+	  }
+	  while (FindNextFileW(hFind, &wfd));
 	  FindClose(hFind);
-	  retCode = ERROR_ALREADY_EXISTS;
-	}
-	return retCode;
-}
-/*************************************************************************
- * SHCreateDirectoryExW      [SHELL32.@]
- */
-DWORD WINAPI SHCreateDirectoryExW(HWND hWnd, LPCWSTR path, LPSECURITY_ATTRIBUTES sec)
-{
-	DWORD ret = SHTryFindW(path);
-	TRACE("(%p, %s, %p)\n",hWnd, debugstr_w(path), sec);
-
-	if (ERROR_FILE_NOT_FOUND == ret)
-	{
-	  ret = ERROR_SUCCESS;
-	  if (PathIsRelativeW(path))
-	  {
-	    ret = ERROR_BAD_PATHNAME;
-	  }
-	}
-	SetLastError(ret);
-	if (ERROR_SUCCESS == ret)
-	{
-	  if (!SHNotifyCreateDirectoryW(path, sec))
-	  {
-	    ret = GetLastError();
-	    if (ret != ERROR_FILE_EXISTS &&
-	        ret != ERROR_ALREADY_EXISTS &&
-	        ret != ERROR_FILENAME_EXCED_RANGE)
-	    {
-	    /* handling network file names?
-	      lstrcpynW(pathName, path, MAX_PATH);
-	      lpStr = PathAddBackslashW(pathName);*/
-	      FIXME("Semi-stub, non zero hWnd should be used somehow?");
-	    }
-	  }
-	}
-	return ret;
+	}
+	return dwAttr;
 }
 
@@ -587,12 +642,13 @@
  *
  */
-BOOL SHFileStrICmpW(LPWSTR p1, LPWSTR p2, LPWSTR p1End, LPWSTR p2End)
+static BOOL SHFileStrICmpW(LPWSTR p1, LPWSTR p2, LPWSTR p1End, LPWSTR p2End)
 {
 	WCHAR C1 = '\0';
 	WCHAR C2 = '\0';
-	int i_Temp = -1;
+	int i_Temp = 0 - (toupperW(p1[0]) == toupperW(p2[0]));
 	int i_len1 = lstrlenW(p1);
 	int i_len2 = lstrlenW(p2);
 
+	if (!i_Temp) return FALSE; /* driveletters are different */
 	if (p1End && (&p1[i_len1] >= p1End) && ('\\' == p1End[0]))
 	{
@@ -634,5 +690,5 @@
  *
  */
-LPWSTR SHFileStrCpyCatW(LPWSTR pTo, LPCWSTR pFrom, LPCWSTR pCatStr)
+static LPWSTR SHFileStrCpyCatW(LPWSTR pTo, LPCWSTR pFrom, LPCWSTR pCatStr)
 {
 	LPWSTR pToFile = NULL;
@@ -645,13 +701,13 @@
 	  {
 	    i_len = lstrlenW(pTo);
-	    if ((i_len) && (pTo[--i_len] != '\\'))
+	    if ((i_len) && ('\\' != pTo[--i_len]))
 	      i_len++;
 	    pTo[i_len] = '\\';
-	    if (pCatStr[0] == '\\')
+	    if ('\\' == pCatStr[0])
 	      pCatStr++; \
 	    lstrcpyW(&pTo[i_len+1], pCatStr);
 	  }
 	  pToFile = StrRChrW(pTo,NULL,'\\');
-/* !! termination of the new string-group */
+	  /* termination of the new string-group */
 	  pTo[(lstrlenW(pTo)) + 1] = '\0';
 	}
@@ -665,7 +721,10 @@
  * files in both lists is the same, and checks also if source-name exists.
  */
-BOOL SHELL_FileNamesMatch(LPCWSTR pszFiles1, LPCWSTR pszFiles2, BOOL bOnlySrc)
+static BOOL SHELL_FileNamesMatch(LPCWSTR pszFiles1, LPCWSTR pszFiles2, BOOL bOnlySrc)
 {
 	LPWSTR pszTemp;
+
+	TRACE("%s %s %d\n", debugstr_w(pszFiles1), debugstr_w(pszFiles2), bOnlySrc);
+
 	while ((pszFiles1[0] != '\0') &&
 	       (bOnlySrc || (pszFiles2[0] != '\0')))
@@ -678,11 +737,10 @@
 	  if (pszTemp)
 	  {
-	    WCHAR szMask [MAX_PATH + 4];
-	    strncpyW(&szMask[0],pszFiles1,(pszTemp - pszFiles1));
-	    pszTemp = StrRChrW(&szMask[0],NULL,'\\');
+	    WCHAR szMask [MAX_PATH];
+	    pszTemp = StrRChrW(pszFiles1, pszTemp, '\\');
 	    if (!pszTemp)
 	      return FALSE;
-	    pszTemp[0] = '\0';
-        /* we will check the root of the mask as valid dir */
+	    lstrcpynW(szMask, pszFiles1, (pszTemp - pszFiles1) + 1);
+	    /* we will check the root of the mask as valid dir */
 	    if (!IsAttribDir(GetFileAttributesW(&szMask[0])))
 	      return FALSE;
@@ -690,5 +748,5 @@
 	  else
 	  {
-	    if (-1 == GetFileAttributesW(pszFiles1))
+	    if (INVALID_FILE_ATTRIBUTES == GetFileAttributesW(pszFiles1))
 	      return FALSE;
 	  }
@@ -701,100 +759,52 @@
 
 /*************************************************************************
- *
- * SHName(s)Translate HelperFunction for SHFileOperationW
- *
- * Translates a list of 0 terminated ASCI strings into Unicode. If *wString
- * is NULL, only the necessary size of the string is determined and returned,
- * otherwise the ASCII strings are copied into it and the buffer is increased
- * to point to the location after the final 0 termination char.
- */
-DWORD SHNameTranslate(LPWSTR* wString, LPCWSTR* pWToFrom, BOOL more)
-{
-	DWORD size = 0, aSize = 0;
-	LPCSTR aString = (LPCSTR)*pWToFrom;
-
-	if (aString)
-	{
-	  do
-	  {
-	    size = lstrlenA(aString) + 1;
-	    aSize += size;
-	    aString += size;
-	  } while ((size != 1) && more);
-	  /* The two sizes might be different in the case of multibyte chars */
-	  size = MultiByteToWideChar(CP_ACP, 0, aString, aSize, *wString, 0);
-	  if (*wString) /* only in the second loop */
-	  {
-	    MultiByteToWideChar(CP_ACP, 0, (LPCSTR)*pWToFrom, aSize, *wString, size);
-	    *pWToFrom = *wString;
-	    *wString += size;
-	  }
-	}
-	return size;
-}
-/*************************************************************************
- * SHFileOperationA          [SHELL32.@]
- *
- * Function to copy, move, delete and create one or more files with optional
- * user prompts.
- *
- * PARAMS
- *  lpFileOp   [I/O] pointer to a structure containing all the necessary information
- *
- * NOTES
- *  exported by name
- */
-DWORD WINAPI SHFileOperationA(LPSHFILEOPSTRUCTA lpFileOp)
-{
-	SHFILEOPSTRUCTW nFileOp = *((LPSHFILEOPSTRUCTW)lpFileOp);
-	DWORD retCode = 0, size;
-	LPWSTR ForFree = NULL, /* we change wString in SHNameTranslate and can't use it for freeing */
-	       wString = NULL; /* we change this in SHNameTranslate */
-
-#ifdef __WIN32OS2__
-	TRACE("SHFileOperationA");
-#else
-	TRACE("\n");
-#endif
-	if (FO_DELETE == (nFileOp.wFunc & FO_MASK))
-	  nFileOp.pTo = NULL; /* we need a NULL or a valid pointer for translation */
-	if (!(nFileOp.fFlags & FOF_SIMPLEPROGRESS))
-	  nFileOp.lpszProgressTitle = NULL; /* we need a NULL or a valid pointer for translation */
-	while (1) /* every loop calculate size, second translate also, if we have storage for this */
-	{
-	  size = SHNameTranslate(&wString, &nFileOp.lpszProgressTitle, FALSE); /* no loop */
-	  size += SHNameTranslate(&wString, &nFileOp.pFrom, TRUE); /* internal loop */
-	  size += SHNameTranslate(&wString, &nFileOp.pTo, TRUE); /* internal loop */
-
-	  if (ForFree)
-	  {
-	    retCode = SHFileOperationW(&nFileOp);
-	    HeapFree(GetProcessHeap(), 0, ForFree); /* we can not use wString, it was changed */
-	    lpFileOp->hNameMappings         = nFileOp.hNameMappings;
-	    lpFileOp->fAnyOperationsAborted = nFileOp.fAnyOperationsAborted;
-	    return retCode;
-	  }
-	  else
-	  {
-	    wString = ForFree = HeapAlloc(GetProcessHeap(), 0, size * sizeof(WCHAR));
-	    if (ForFree) continue;
-	    retCode = ERROR_OUTOFMEMORY;
-	    SetLastError(retCode);
-	    return retCode;
-	  }
-	}
-}
-/*************************************************************************
  * SHFileOperationCheck
  */
-DWORD SHFileOperationCheck(LPSHFILEOPSTRUCTW lpFileOp, LPCSTR* cFO_Name)
+static DWORD SHFileOperationCheck(LPSHFILEOPSTRUCTW lpFileOp, LPCSTR* cFO_Name)
 {
 	FILEOP_FLAGS OFl = (FILEOP_FLAGS)lpFileOp->fFlags;
-	LPCSTR cFO_Temp [] = {"FO_????","FO_MOVE","FO_COPY","FO_DELETE","FO_RENAME"};
 	long retCode = NO_ERROR;
 	long FuncSwitch = (lpFileOp->wFunc & FO_MASK);
 
 	/*  default no error */
-
+	if (none == WOsVers) {
+	  OSVERSIONINFOA info;
+	  info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOA);
+	  GetVersionExA(&info);
+	  WOsVers = wMe; /* <= wMe, tested with w98se and partialy nt4,w95 */
+	  /* this cases must be more different */
+	  if ((VER_PLATFORM_WIN32_WINDOWS == info.dwPlatformId) &&
+	      (4 == info.dwMajorVersion) && (10 == info.dwMinorVersion)) {
+	    WOsVers = w98se;
+	    retCodeIsInvalid = 0x75; /* <= W98se, what is with wMe? */
+	  }
+	  if (VER_PLATFORM_WIN32_NT == info.dwPlatformId)
+	  {
+	    if (4 > info.dwMajorVersion)
+	    {
+	      WOsVers = nt351;
+	      retCodeIsInvalid =  0x75;
+	    }
+	    if (4 == info.dwMajorVersion)
+	    {
+	      WOsVers = nt40;
+	      retCodeIsInvalid =  0x75;
+	    }
+	    if (5 == info.dwMajorVersion)
+	    {
+	      WOsVers = w2k;
+	      if (0 < info.dwMinorVersion)
+	        WOsVers = wXp; /* Longhorn also ? */
+	      retCodeIsInvalid = 0x4c7; /* >= W2K */
+	    }
+	    if (5 < info.dwMajorVersion)
+	    {
+	      WOsVers = wXp; /* Longhorn ? */
+	      retCodeIsInvalid = 0x4c7; /* >= W2K */
+	    }
+	  }
+	  TRACE("WOsVers:%d Id: %ld Ver: %ld.%ld.%ld, %s\n\n", WOsVers, info.dwPlatformId,
+	         info.dwMajorVersion, info.dwMinorVersion, info.dwBuildNumber, info.szCSDVersion);
+	}
 	if ((FuncSwitch < FO_MOVE) || (FuncSwitch > FO_RENAME))
 	{
@@ -802,8 +812,9 @@
 	  retCode = ERROR_INVALID_PARAMETER;
 	}
-	cFO_Name[0] = cFO_Temp [FuncSwitch];
+	cFO_Name[0] = cFO_String [FuncSwitch];
 
 	if (!(~FO_MASK & lpFileOp->wFunc)) /* ? Level == 0 */
-	{ 
+	{
+	  lpFileOp->hNameMappings = 0;
 	  lpFileOp->fAnyOperationsAborted = FALSE;
 	  TRACE("%s: flags (0x%04x) : %s%s%s%s%s%s%s%s%s%s%s%s%s \n",cFO_Name[0], OFl,
@@ -821,10 +832,11 @@
 	              OFl & FOF_NOCOPYSECURITYATTRIBS ? "FOF_NOCOPYSECURITYATTRIBS" : "",
 	              OFl & 0xf000 ? "MORE-UNKNOWN-Flags" : "");
-	  OFl &= (~(FOF_MULTIDESTFILES | FOF_NOCONFIRMATION | FOF_FILESONLY));  /* implemented */
+	  OFl &= (~(FOF_FILESONLY | FOF_WANTMAPPINGHANDLE | FOF_NOCONFIRMATION |
+	            FOF_RENAMEONCOLLISION | FOF_MULTIDESTFILES));  /* implemented */
 	  OFl ^= (FOF_SILENT | FOF_NOCONFIRMMKDIR | FOF_NOERRORUI | FOF_NOCOPYSECURITYATTRIBS); /* ignored, if one */
 	  OFl &= (~FOF_SIMPLEPROGRESS);                      /* ignored, only with FOF_SILENT */
 	  if (OFl)
 	  {
-	    if (OFl & (~(FOF_CONFIRMMOUSE | FOF_SILENT | FOF_RENAMEONCOLLISION |
+	    if (OFl & (~(FOF_CONFIRMMOUSE | FOF_SILENT |
 	                 FOF_NOCONFIRMMKDIR | FOF_NOERRORUI | FOF_NOCOPYSECURITYATTRIBS)))
 	    {
@@ -840,4 +852,92 @@
 	return retCode;
 }
+
+/*************************************************************************
+ *
+ * SHCreateMappingElement internal HelperFunction for SHRenameOnCollision
+ *
+ * Old/New MappingNameElement
+ */
+static LPWSTR SHCreateMappingElement(PINT size, LPWSTR pName)
+{
+	LPWSTR pMapName = NULL;
+	CHAR TempPath [MAX_PATH];
+	int isize = lstrlenW(pName)+1;
+	int oldsize = isize;
+	if ((w98se >= WOsVers) && (nt40 != WOsVers) && (nt351 != WOsVers))
+	{
+	  isize = WideCharToMultiByte( CP_ACP, 0, pName, oldsize, TempPath, MAX_PATH, NULL, NULL );
+	  if (0 < isize)
+	  	pName = (LPWSTR)&TempPath[0];
+	}
+	else
+	{
+	  oldsize = oldsize*sizeof(WCHAR);
+	}
+	pMapName = SHAlloc(oldsize);
+	memcpy(pMapName,pName,oldsize);
+	*size = isize-1;
+	return pMapName;
+}
+
+/*************************************************************************
+ *
+ * SHRenameOnCollision internal HelperFunction for SHFileOperationW
+ *
+ * Creates new Names and Checks for existance.
+ *
+ * w98 has problems with some remames on collision, if the original target-name,
+ * or the root of the target-name is equal any former orginal target-name,
+ * and if the root-dir of the target differs from the partiell root-dir of the source.
+ * If we have different target-names or has all target the same root of hear source,
+ * we have the problem not, root of target can be shorter as the full root of source. 
+ * I think, that is a mapping-problem.
+ * Move within the same or shorter root can made from fo_rename,
+ * that works every in w98, only move/copy in other roots has this problem,
+ * this must be done in fo_move/fo_copy, there we have the problem.
+ * we ignore this problem, it is solved in w2k. 
+ */
+static WCHAR wStrFormat[] = {' ','(','%','d',')',' ',0};
+
+static DWORD SHRenameOnCollision(LPWSTR pTempTo, LPWSTR pToFile, LPCWSTR pFromFile, LPSHFILEOPSTRUCTW lpFileOp)
+{
+/* todo ERROR_FILENAME_EXCED_RANGE ?? */
+	static WCHAR wCopy_x_of[40] = {0};
+	LPWSTR pszTemp = wStrFormat + 5;
+	DWORD ToAttr;
+	WCHAR szNumber[16];
+	WCHAR szOldToName [MAX_PATH];
+	int number = 0;
+
+	while (ToAttr = SHFindAttrW(pTempTo, FALSE),
+	       (INVALID_FILE_ATTRIBUTES != ToAttr) && (FOF_RENAMEONCOLLISION & lpFileOp->fFlags))
+	{
+	  if (!number)
+	  {
+	    if (!*wCopy_x_of && !LoadStringW(shell32_hInstance, IDS_COPY_X_OF_TEXT, wCopy_x_of, sizeof(wCopy_x_of)-1))
+	      break; /* should never be */
+	    lstrcpyW(szOldToName, pTempTo);
+	  }
+	  number++;
+	  if (1 < number)
+	  {
+	    pszTemp = szNumber;
+	    wsprintfW(szNumber, wStrFormat, number);
+	  }
+	  wsprintfW(pToFile + 1,wCopy_x_of, pszTemp, pFromFile + 1);
+	  pToFile[lstrlenW(pToFile)+1] = 0;
+
+	} /* endwhile */
+	if (number)
+	{
+	  SHNAMEMAPPINGW shm;
+	  shm.pszOldPath = SHCreateMappingElement(&shm.cchOldPath, szOldToName);
+	  shm.pszNewPath = SHCreateMappingElement(&shm.cchNewPath, pTempTo);
+	  if (!lpFileOp->hNameMappings)
+	    lpFileOp->hNameMappings = DSA_Create(sizeof(SHNAMEMAPPINGW),1);
+	  DSA_InsertItem (lpFileOp->hNameMappings, ((HDSA)lpFileOp->hNameMappings)->nItemCount, &shm);
+	}
+	return ToAttr;
+}
 /*************************************************************************
  *
@@ -849,36 +949,29 @@
  * also FO_RENAME does not contains FO_MOVE, only common Parts.
  */
-DWORD SHFileOperationMove(LPSHFILEOPSTRUCTW lpFileOp)
-{
-	DWORD retCode;
+static DWORD SHFileOperationMove(LPSHFILEOPSTRUCTW lpFileOp)
+{
 	WCHAR szToName [MAX_PATH + 4];
-	LPWSTR pToFile;
-	if (NULL != StrPBrkW(lpFileOp->pTo, wWildcardChars))
-	{
-#ifdef W98_FO_FUNCTION /* W98 */
-	  return ERROR_FILE_NOT_FOUND;
-#else
-	  return ERROR_INVALID_NAME;
-#endif
-	}
-	retCode = SHTryFindW(lpFileOp->pTo);
+	LPCWSTR pTo = lpFileOp->pTo;
+	int i_lenTo;
+	if (NULL != StrPBrkW(pTo, wWildcardChars))
+	{
+	  if (w98se >= WOsVers) /* wMe? */
+	    return ERROR_FILE_NOT_FOUND; /* w98se */
+	  return ERROR_INVALID_NAME; /* w2k */
+	}
+
 	/* FOF_NOCONFIRMATION, FOF_RENAMEONCOLLISION ? */
-	if (retCode != ERROR_FILE_NOT_FOUND)
-	{
-	  return retCode;
-	}
-	lstrcpyW(&szToName[0],lpFileOp->pTo);
-	pToFile = StrRChrW(&szToName[0],NULL,'\\');
-	if (!pToFile[1])
-	{
-	  pToFile[0] = '\0';
-	}
-	/* we use SHNotifyMoveFile() instead MoveFileW */
-	if (!SHNotifyMoveFileW(lpFileOp->pFrom, &szToName[0]))
-	{
-	  /* we need still the value for the returncode */
-	  return GetLastError();
-	}
-	return ERROR_SUCCESS;
+	i_lenTo = lstrlenW(pTo);
+	if (i_lenTo && ('\\' == pTo[--i_lenTo]))
+	{
+	  lstrcpynW(szToName, pTo, i_lenTo + 1);
+	  pTo = &szToName[0];
+	}
+	if (INVALID_FILE_ATTRIBUTES != SHFindAttrW(pTo, FALSE))
+	{
+	  return ERROR_ALREADY_EXISTS;
+	}
+	/* we use SHNotifyMoveFile() instead of MoveFileW */
+	return SHNotifyMoveFileW(lpFileOp->pFrom, pTo);
 }
 /*************************************************************************
@@ -895,13 +988,4 @@
 	LPCWSTR pFrom = pNextFrom;
 	LPCWSTR pTo = NULL;
-#ifdef __WIN32OS2__
-#ifdef DEBUG
-#define _SHFO_DEBUGSTR_
-#ifdef _SHFO_DEBUGSTR_
-	CHAR Debug_pFrom [MAX_PATH + 4];
-	CHAR Debug_pTo [MAX_PATH + 4];
-#endif
-#endif
-#endif
 	HANDLE hFind = INVALID_HANDLE_VALUE;
 	WIN32_FIND_DATAW wfd;
@@ -915,20 +999,23 @@
 	DWORD ToPathAttr;
 	DWORD FromAttr;
-	DWORD FromPathAttr;
 	
-	BOOL b_Multi = (nFileOp.fFlags & FOF_MULTIDESTFILES);
-
-	BOOL b_MultiTo = (FO_DELETE != (lpFileOp->wFunc & FO_MASK));
-	BOOL b_MultiPaired = FALSE;
+	long FuncSwitch = (nFileOp.wFunc & FO_MASK);
+	long level= nFileOp.wFunc>>FO_LevelShift;
+
+	BOOL b_Multi = (0 != (nFileOp.fFlags & FOF_MULTIDESTFILES));
+
+	BOOL b_MultiTo = (FO_DELETE != FuncSwitch);
+	BOOL b_MultiPaired = (0 < level) /* FALSE only at Level 0 */;
 	BOOL b_MultiFrom = FALSE;
-	BOOL not_overwrite;
-	BOOL ask_overwrite;
+	BOOL b_RenamOnColl = (0 != (nFileOp.fFlags & FOF_RENAMEONCOLLISION));
+	BOOL b_NoConfirm = (0 != (nFileOp.fFlags & FOF_NOCONFIRMATION));
+	BOOL b_ask_overwrite = (!b_NoConfirm && !b_RenamOnColl);
+	BOOL b_not_overwrite = (!b_NoConfirm ||  b_RenamOnColl);
+	BOOL b_DELETE = (FO_DELETE == FuncSwitch);
 	BOOL b_SameRoot;
 	BOOL b_SameRoot_MOVE;
 	BOOL b_ToMask = FALSE;
 	BOOL b_FromMask;
-
-	long FuncSwitch = (nFileOp.wFunc & FO_MASK);
-	long level= nFileOp.wFunc>>FO_LevelShift;
+	BOOL b_FileMask;
 
 	LPCSTR cFO_Name;
@@ -937,8 +1024,6 @@
 	if (retCode)
 	{
-#ifdef W98_FO_FUNCTION /* W98 returns NO_ERROR */
-	  if ('?' == cFO_Name[3]) 
-	    retCode = NO_ERROR;
-#endif
+	  if (('?' == cFO_Name[3]) && (/* wMe ?*/ w98se >= WOsVers))
+	    retCode = NO_ERROR; /* nt4.0, w95, w98se returns no error, w2k, wXp not */
 	  goto shfileop_exit; /* no valid FunctionCode */
 	}
@@ -972,5 +1057,5 @@
 	  if ((pNextFrom) && (!(b_MultiTo) || (pNextTo)))
 	  {
-	    nFileOp.pFrom = pTempFrom = HeapAlloc(GetProcessHeap(), 0, ((1 + 2 * (b_MultiTo)) * MAX_PATH + 6) * sizeof(WCHAR));
+	    nFileOp.pFrom = pTempFrom = SHAlloc(((1 + 2 * (b_MultiTo)) * MAX_PATH + 6) * sizeof(WCHAR));
 	    if (!pTempFrom)
 	    {
@@ -982,10 +1067,13 @@
 	      pTempTo = &pTempFrom[MAX_PATH + 4];
 	    nFileOp.pTo = pTempTo;
-	    ask_overwrite = (!(nFileOp.fFlags & FOF_NOCONFIRMATION) && !(nFileOp.fFlags & FOF_RENAMEONCOLLISION));
-	    not_overwrite = (!(nFileOp.fFlags & FOF_NOCONFIRMATION) ||  (nFileOp.fFlags & FOF_RENAMEONCOLLISION));
+	    if (0 == level)
+	    {
+	      if ((0 != (nFileOp.fFlags & FOF_NOCONFIRMATION)) && b_RenamOnColl)
+	        nFileOp.fAnyOperationsAborted |= FOI_NeverOverwrite;
+	    }
 	  }
 	  else
 	  {
-	    retCode = 0x402;      /* 1026 */
+	    retCode = 0x402;      /* 1026 */ 
 	    goto shfileop_exit;
 	  }
@@ -1000,18 +1088,11 @@
 	      pTo = pNextTo;
 	      pNextTo = &pNextTo[lstrlenW(pTo)+1];
-	      b_MultiTo = (b_Multi && pNextTo[0]);
+	      b_MultiTo = (b_Multi && (0 != pNextTo[0]));
 	    }
 
 	    pFrom = pNextFrom;
-#ifdef _SHFO_DEBUGSTR_
-	    /* for seeing in debugger outside from TRACE */
-	    strcpy(&Debug_pFrom[0],debugstr_w(pFrom));
-	    strcpy(&Debug_pTo[0],debugstr_w(pTo));
-	    TRACE("%s level=%ld with %s %s%s\n",
-	      cFO_Name, level, &Debug_pFrom[0], pTo ? "-> ":"", &Debug_pTo[0]);
-#endif
-	    pNextFrom = &pNextFrom[lstrlenW(pNextFrom)+1];
+	    pNextFrom = &pNextFrom[lstrlenW(pNextFrom) + 1];
 	    if (!b_MultiFrom && !b_MultiTo)
-	      b_MultiFrom = (pNextFrom[0]);
+	      b_MultiFrom = (0 != pNextFrom[0]);
 
 	    pFromFile = SHFileStrCpyCatW(pTempFrom, pFrom, NULL);
@@ -1028,10 +1109,6 @@
 	      if (b_MultiTo || b_MultiFrom || (b_FromMask && !b_ToMask))
 	      {
-#define retCodeIsInvalid 0x075 /* W98 */
-#ifndef W98_FO_FUNCTION /* is W2K */
-#undef retCodeIsInvalid
-#define retCodeIsInvalid 0x4c7 /* W2K */
-	        retCode = 0x1f;    /* value 31 in W2K, W98 no work, only RC=0 */
-#endif
+	        if (/* wMe? */ w2k <= WOsVers)
+	          retCode = ERROR_GEN_FAILURE;  /* W2K ERROR_GEN_FAILURE, w95,W98,NT40 returns no error */
 	        goto shfileop_exit;
 	      }
@@ -1042,18 +1119,43 @@
 	      b_MultiPaired =
 	        SHELL_FileNamesMatch(lpFileOp->pFrom,
-	              lpFileOp->pTo, ((FO_DELETE == FuncSwitch) || !b_Multi || b_MultiFrom));
+	              lpFileOp->pTo, (b_DELETE || !b_Multi || b_MultiFrom));
 	    } /* endif */
 	    if (!(b_MultiPaired) || !(pFromFile) || !(pFromFile[1]) || ((pTo) && !(pToFile)))
 	    {
-	      retCode = 0x402;      /* 1026 */
+	      if (nt40 < WOsVers)
+	        retCode = 0x402;      /* 1026, nt40 returns 0 */
 	      goto shfileop_exit;
 	    }
 
-	    if (FO_DELETE == FuncSwitch)
+	    b_FileMask = b_FromMask && (FOF_FILESONLY & nFileOp.fFlags);
+	    if (!b_DELETE)
+	    {
+	      b_SameRoot = (toupperW(pTempFrom[0]) == toupperW(pTempTo[0]));
+	      b_SameRoot_MOVE = (b_SameRoot && (FO_MOVE == FuncSwitch));
+	    }
+	    FromAttr = SHFindAttrW(pTempFrom, b_FileMask);
+	    if (INVALID_FILE_ATTRIBUTES == FromAttr) 
+	    {
+	      retCode = GetLastError();
+	      if (ERROR_FILE_NOT_FOUND == retCode || ERROR_NO_MORE_FILES == retCode) /* only tested in wXp,w2k,w98 */
+	      {
+	        if (b_FromMask)
+	        {
+	          retCode = NO_ERROR;
+	        }
+	        else
+	          if (!b_SameRoot_MOVE && !b_DELETE)
+	            goto shfileop_IsInvalid;
+	      }
+	      continue;
+	    } /* endif */
+
+	    if (b_DELETE)
 	    {
 	      hFind = FindFirstFileW(pFrom, &wfd);
 	      if (INVALID_HANDLE_VALUE == hFind)
-	        /* no problem for FO_DELETE */
-	        continue;
+	      {
+	        goto shfileop_IsInvalid;
+	      }
 	      do
 	      {
@@ -1062,5 +1164,5 @@
 	           lpFileName = wfd.cFileName;
 	        if (IsDotDir(lpFileName) ||
-	            ((b_FromMask) && IsAttribDir(wfd.dwFileAttributes) && (nFileOp.fFlags & FOF_FILESONLY)))
+	            (b_FileMask && IsAttribDir(wfd.dwFileAttributes)))
 	          continue;
 	        SHFileStrCpyCatW(&pFromFile[1], lpFileName, NULL);
@@ -1068,5 +1170,5 @@
 	        if (IsAttribFile(wfd.dwFileAttributes))
 	        {
-	          if (!SHNotifyDeleteFileW(pTempFrom))
+	          if (SHNotifyDeleteFileW(pTempFrom))
 	            retCode = 0x78; /* value unknown */
 	        }
@@ -1085,5 +1187,5 @@
 	    {
 	      pToFile[0] = '\0';
-	      lpFileName = StrRChrW(pTempTo,NULL,'\\');
+	      lpFileName = StrRChrW(pTempTo, NULL, '\\');
 	      if (lpFileName)
 	      {
@@ -1093,27 +1195,27 @@
 	    }
 	    ToPathAttr = ToAttr = GetFileAttributesW(pTempTo);
-	    FromAttr = GetFileAttributesW(pTempFrom);
-	    b_SameRoot = (toupperW(pTempFrom[0]) == toupperW(pTempTo[0]));
-	    b_SameRoot_MOVE = (b_SameRoot && (FO_MOVE == FuncSwitch));
-	    if ((pToFile) && !IsAttribDir(ToAttr))
-	    {
-	      pToFile[0] = '\0';
+	    if (!IsAttribDir(ToAttr) && SetIfPointer(pToFile, '\0'))
+	    {
 	      ToPathAttr = GetFileAttributesW(pTempTo);
-	      pToFile[0] = '\\';
+	      *pToFile = '\\';
 	    }
-	    if (pToTailSlash)
-	    {
-	      pToTailSlash[0] = '\\';
-	    }
-	    if (!b_FromMask && b_SameRoot && \
-	      SHFileStrICmpW(pTempFrom, pTempTo, NULL, NULL))
-	    { /* target is the same as source ? W98 has 0x71, W2K also */
-	      retCode = 0x71; /* is no error with FOF_RENAMEONCOLLISION */
-	      goto shfileop_exit;
-	    } /* endif */
+	    SetIfPointer(pToTailSlash,'\\');
+
 	    /* FO_RENAME is not only a Filter for FO_MOVE */
 	    if (FO_RENAME == FuncSwitch)
 	    {
-	      if (b_FromMask || !b_SameRoot || \
+	      if (!(b_FromMask) && (b_SameRoot) && SHFileStrICmpW(pTempFrom, pTempTo, NULL, NULL))
+	      {
+	        if (!b_RenamOnColl) /* neu */
+	      /* target is the same as source ? W98 has 0x71, W2K also */
+	          retCode = 0x71;
+	        goto shfileop_exit;
+	      } /* endif */
+	      if ((nt40 == WOsVers) && (b_FromMask))
+	      {
+	        retCode = 0x72;  /* only found in nt40, not w98se or w2k */
+	        goto shfileop_exit;
+	      } /* endif */
+	      if ((b_FromMask && !b_ToMask) || !b_SameRoot || \
 	        !SHFileStrICmpW(pTempFrom, pTempTo, pFromFile, NULL) || \
 	         SHFileStrICmpW(pTempFrom, pTempTo, pFromFile, HIGH_ADR))
@@ -1122,76 +1224,179 @@
 	        goto shfileop_exit;
 	      }
-#ifdef W98_FO_FUNCTION /* not in W2K, later in SHFileOperationMove */
-	      if (!pToTailSlash && IsAttribDir(ToAttr))
+	      if (!(b_ToMask) && !(pToTailSlash) && IsAttribDir(ToAttr))
 	      {
-	        retCode = ERROR_INVALID_NAME; /* FOF_NOCONFIRMATION, FOF_RENAMEONCOLLISION ? */
+	        if (IsAttribDir(FromAttr))
+	          ToAttr = SHRenameOnCollision(pTempTo, pToFile, pFromFile, &nFileOp);
+	        if ((w98se >= WOsVers) && IsAttribDir(ToAttr /* can be changed from SHRenameOnCollision */))
+	        {
+	          /* never in W2K */
+	          retCode = ERROR_INVALID_NAME; /* FOF_NOCONFIRMATION ? */
+	          goto shfileop_exit;
+	        }
+	      } /* endif */
+	      if ((INVALID_FILE_ATTRIBUTES != ToPathAttr) || (b_ToMask && (w98se >= WOsVers)))
+	      /* w2k only (INVALID_FILE_ATTRIBUTES != ToPathAttr) */
+	      {
+	        retCode = SHFileOperationMove(&nFileOp);
+	      }
+	      else
+	        /* W98 returns 0x75, W2K 0x4c7 */
+	        retCode = retCodeIsInvalid;
+	      goto shfileop_exit;
+	    } /* FO_RENAME ends, only FO_MOVE or FO_COPY valid from here */
+
+	    if (b_FromMask)
+	    {
+	      /* FO_COPY/FO_MOVE with mask, FO_DELETE are solved long before */
+	      hFind = FindFirstFileW(pFrom, &wfd);
+	      if (INVALID_HANDLE_VALUE == hFind)
+	      {
+	        /* the retcode for this case is unknown */
+	        goto shfileop_IsInvalid;
+	      }
+	      SetIfPointer(pToTailSlash, '\0');
+	      ToAttr = SHFindAttrW(pTempTo, FALSE);
+	      if (b_ToMask && !b_Multi)
+	        nFileOp.fFlags &= ~FOF_RENAMEONCOLLISION;
+	      nFileOp.fFlags &= ~FOF_MULTIDESTFILES;
+	      pToFile = SHFileStrCpyCatW(pTempTo, NULL, wBackslash);
+	      do
+	      {
+	        lpFileName = wfd.cAlternateFileName;
+	        if (!lpFileName[0])
+	          lpFileName = wfd.cFileName;
+	        if (IsDotDir(lpFileName) ||
+	            (b_FileMask && IsAttribDir(wfd.dwFileAttributes)))
+	          continue; /* next name in pTempFrom(dir) */
+	        if (INVALID_FILE_ATTRIBUTES == ToAttr)
+	        {
+	          if (b_MultiTo)
+	          {
+	            retCode = retCodeIsInvalid;
+	            break; /* we need the FindClose */
+	          }
+	          if (b_ToMask)
+	          {
+	            if ((w2k <= WOsVers) && IsAttribDir(wfd.dwFileAttributes)) /* w2k,wXp is tested */
+	            {
+	              if (w2k == WOsVers)
+	                retCode = ERROR_ALREADY_EXISTS; /* no root for target exist, and w2k send this, kind of mad */
+	              else
+	                retCode = ERROR_INVALID_NAME; /* wXp */
+	              nFileOp.fAnyOperationsAborted |= TRUE;
+	              break;
+	            }
+	          }
+	          else
+	          {
+	            nFileOp.fFlags |= FOF_MULTIDESTFILES;
+	            SHFileStrCpyCatW(&pToFile[1], lpFileName, NULL);
+	          }
+	        }
+	        SHFileStrCpyCatW(&pFromFile[1], lpFileName, NULL);
+	        retCode = SHFileOperationW (&nFileOp);
+	      } while(!retCode && FindNextFileW(hFind, &wfd));
+	      FindClose(hFind);
+	      if (retCodeIsInvalid == retCode)
+	        goto shfileop_IsInvalid;
+	      continue;
+	    }
+
+	    if ((INVALID_FILE_ATTRIBUTES != (FromAttr | ToAttr)) && b_RenamOnColl && !(b_ToMask) && !(pToTailSlash))
+	    {
+	      if (b_SameRoot_MOVE && !(b_Multi) && IsAttribDir(FromAttr & ToAttr) && SHFileStrICmpW(pTempFrom, pTempTo, HIGH_ADR, HIGH_ADR))
+	      {
+	        retCode = ERROR_FILENAME_EXCED_RANGE; /* in w98/w2k recursive move, we does this not */
+	        if (w98se >= WOsVers) retCode |= 0x10000; /* unexpected, seen in w98se and nt40sp6 */
 	        goto shfileop_exit;
 	      }
-	      if (-1 != ToPathAttr || b_ToMask)
-#else
-	      if (-1 != ToPathAttr)
-#endif
+	      if ( /* i-means indifferent */ 
+//	  /*bad*/   ( b_SameRoot_MOVE && !(b_Multi) && !(b_MultiFrom) && IsAttribDir(ToAttr) && !(SHFileStrICmpW(pTempFrom, pTempTo, NULL, NULL)))
+//	  /*bad*/   ( b_SameRoot_MOVE && !(b_Multi) &&  (b_MultiFrom) && IsAttribDir(ToAttr) && !(SHFileStrICmpW(pTempFrom, pTempTo, NULL, NULL)))
+	  /*ok*/    ( b_SameRoot_MOVE &&  (b_Multi) && !(b_MultiFrom) && IsAttribDir(ToAttr) && !(SHFileStrICmpW(pTempFrom, pTempTo, NULL, NULL)))
+//	  /*bad*/|| ( b_SameRoot_MOVE &&  (b_Multi) &&  (b_MultiFrom) && IsAttribDir(ToAttr) && !(SHFileStrICmpW(pTempFrom, pTempTo, NULL, NULL)))
+//
+//	  /*bad*/|| (!b_SameRoot_MOVE && !(b_Multi) && !(b_MultiFrom) && IsAttribDir(ToAttr) && IsAttribDir(FromAttr))
+//	  /*i*/  || (!b_SameRoot_MOVE && !(b_Multi) &&  (b_MultiFrom) && IsAttribDir(ToAttr) && IsAttribDir(FromAttr))
+	  /*ok*/ || (!b_SameRoot_MOVE &&  (b_Multi) && !(b_MultiFrom) && IsAttribDir(ToAttr) && IsAttribDir(FromAttr))
+//	  /*i*/  || (!b_SameRoot_MOVE &&  (b_Multi) &&  (b_MultiFrom) && IsAttribDir(ToAttr) && IsAttribDir(FromAttr))
+//
+	  /*ok*/ || ( b_SameRoot_MOVE && IsAttribFile(FromAttr | ToAttr) && !(SHFileStrICmpW(pTempFrom, pTempTo, NULL, NULL)))
+//
+	  /*ok*/ || (!b_SameRoot_MOVE && IsAttribFile(FromAttr | ToAttr))
+	  /*ok*/ || ((FO_COPY == FuncSwitch) && IsAttribDir(FromAttr) && IsAttribFile(ToAttr))
+	          )
 	      {
-	        retCode = SHFileOperationMove(&nFileOp);
-	        goto shfileop_exit;
-	      }
+	        ToAttr = SHRenameOnCollision(pTempTo, pToFile, pFromFile, &nFileOp);
+	      } /* endif */
+	    } /* endif */
+	    if ((b_SameRoot) && !(b_MultiFrom) && (!b_RenamOnColl || b_SameRoot_MOVE)
+	    && SHFileStrICmpW(pTempFrom, pTempTo, NULL, NULL))
+	    {
+	      if (!b_RenamOnColl && (IsAttribFile(FromAttr))) /* neu */
+	        /* target is the same as source ? W98 has 0x71, W2K also */
+	        retCode = 0x71;
+	      goto shfileop_exit;
+	    } /* endif */
+
+	    /* Analycing for moving SourceName to as TargetName */
+	    if ((b_MultiFrom || !b_Multi) && (
+	        (IsAttribFile(FromAttr) && IsAttribDir(ToAttr))
+	    ||  (!b_MultiTo && IsAttribDir(ToAttr))
+	    ||  (!b_MultiTo && IsAttribDir(FromAttr) && b_MultiFrom && !b_SameRoot_MOVE)
+	       ))
+	    {
+	        SHFileStrCpyCatW(pTempTo, NULL, pFromFile);
+	        /* without FOF_MULTIDESTFILES shlfileop will create dir's recursive */
+	        nFileOp.fFlags |= FOF_MULTIDESTFILES;
+	        retCode = SHFileOperationW(&nFileOp);
+	        continue;
 	    }
-	    else \
-	    if (!b_FromMask)
-	    {
-	      if (IsAttribDir(ToPathAttr))
+	    /* What can we do with one pair and FO_MOVE/FO_COPY ? */
+	    /* w98se, nt40 can create recursive dirs, W2K not! wMe ist not tested */
+	    if (IsAttribDir(ToPathAttr) || !b_SameRoot_MOVE || (w98se >= WOsVers))
+	    if (!b_MultiFrom) 
+	    {
+	      if (IsAttribFile(FromAttr))
 	      {
-	    /* Analycing for moving SourceName to as TargetName */
-	        if (!b_MultiTo && IsAttribDir(ToAttr) && (b_MultiFrom || !b_Multi))
+	        if (b_SameRoot_MOVE &&
+	          /* IsAttribDir(ToPathAttr) && !pToTailSlash && (bug) */
+	          /* windows-bug, MOVE for File also with pToTailSlash, COPY not for this */
+	           (!(IsAttribFile(ToAttr)) || (!(b_ask_overwrite) && b_not_overwrite)) &&
+	           (IsAttribDir(ToPathAttr) || b_ToMask))
 	        {
-	          SHFileStrCpyCatW(pTempTo, NULL, pFromFile);
-	          /* without FOF_MULTIDESTFILES shlfileop will create dir's recursive */
-	          nFileOp.fFlags |= FOF_MULTIDESTFILES;
-	          retCode = SHFileOperationW(&nFileOp);
+	          /* At the same drive, we can move for FO_MOVE, dir to dir is solved later */
+	          retCode = SHFileOperationMove(&nFileOp);
+	          if ((nt40 == WOsVers) && (ERROR_ALREADY_EXISTS == retCode))
+	            retCode = 0x10005;
 	          continue;
-	        }
-	      }
-	      /* What can we do with one pair and FO_MOVE/FO_COPY ? */
-#ifndef W98_FO_FUNCTION /* W2K */
-	      if (!b_SameRoot_MOVE || IsAttribDir(ToPathAttr))
-#endif
-	      if (!b_MultiFrom)
-//	      if ((!b_MultiFrom) && (!b_SameRoot_MOVE || IsAttribDir(ToPathAttr) || b_ToMask))
-
-	      {
-	        if (IsAttribFile(FromAttr))
+	        } /* endif */
+	        if (IsAttribDir(ToPathAttr) && !pToTailSlash && !IsAttribDir(ToAttr))
 	        {
-	          if (b_SameRoot_MOVE \
-	       /* IsAttribDir(ToPathAttr) && !pToTailSlash && (bug) */
-	       /* windos-bug, MOVE for File also with pToTailSlash, COPY not for this */
-//	              && IsAttribDir(ToPathAttr))
-	              && (IsAttribDir(ToPathAttr) || b_ToMask))
+	          if (!(FOI_NeverOverwrite & nFileOp.fAnyOperationsAborted))
 	          {
-	       /* At the same drive, we can move for FO_MOVE, dir to dir was solved later */
-	            retCode = SHFileOperationMove(&nFileOp);
-	            continue;
+	            if (!b_not_overwrite)
+	              ToAttr = INVALID_FILE_ATTRIBUTES;
+	            if (IsAttribFile(ToAttr) && b_not_overwrite)
+	            {
+	              if (b_ask_overwrite)
+	              {
+	                /* we must change the dialog in the future for return 3-4 cases,
+	                 * 'Yes','No','Yes for all','Never ?' */
+	                if ((INVALID_FILE_ATTRIBUTES != ToAttr) && !SHELL_ConfirmDialogW(ASK_OVERWRITE_FILE, pTempTo))
+	                {
+	                  retCode = 0x10008;
+	                  nFileOp.fAnyOperationsAborted |= TRUE;
+	                  continue;
+	                } 
+	                ToAttr = INVALID_FILE_ATTRIBUTES;
+	              } /* endif */
+	            } /* endif */
 	          } /* endif */
-	          if (IsAttribDir(ToPathAttr) && !pToTailSlash && !IsAttribDir(ToAttr))
+	          if (INVALID_FILE_ATTRIBUTES == ToAttr)
 	          {
-	            if (IsAttribFile(ToAttr) && not_overwrite)
+	            if (SHNotifyCopyFileW(pTempFrom, pTempTo, nFileOp.fFlags & FOF_RENAMEONCOLLISION))
 	            {
-	              /* Rename on Collision ? */
-	              if (!ask_overwrite)
-	              {
-	                /* the retcode for this case is unknown */
-	                retCode = 0x10008;
-	                goto shfileop_exit;
-	              }
-	              /* we must change the dialog in the future for return 3-4 cases,
-	               * 'Yes','No','Yes for all','Never ?' */
-	              if (!SHELL_ConfirmDialogW(ASK_OVERWRITE_FILE, pTempTo))
-	              {
-	                nFileOp.fAnyOperationsAborted = TRUE;
-	                continue;
-	              } 
-	            }
-	            if (!(SHNotifyCopyFileW(pTempFrom, pTempTo, nFileOp.fFlags & FOF_RENAMEONCOLLISION)))
-	            {
-	            /* the retcode for this case is unknown */
+	              /* the retcode for this case is unknown */
 	              retCode = 0x10009;
 	            }
@@ -1203,93 +1408,84 @@
 	          }
 	        }
-	        if (IsAttribDir(FromAttr))
+	      }
+	      if (IsAttribDir(FromAttr))
+	      {
+	        if (INVALID_FILE_ATTRIBUTES == ToAttr)
 	        {
-#ifdef W98_FO_FUNCTION /* not in W2K, -> retCode = retCodeIsInvalid */
-	          if ((-1 == ToAttr) && (!b_SameRoot_MOVE || IsAttribDir(ToPathAttr) || b_ToMask))
+	          SetIfPointer(pToTailSlash, '\0');
+	          if (w2k <= WOsVers)  /* if w2k,wxp  not in w98se, nt40sp6 */
 	          {
-	            if (-1 == ToPathAttr)
+	            ToAttr = SHRenameOnCollision(pTempTo, pToFile, pFromFile, &nFileOp);
+	            if (INVALID_FILE_ATTRIBUTES != ToAttr)
 	            {
-	              pToFile[0] = '\0';
-	              retCode = SHCreateDirectoryExW(NULL,pTempTo, NULL);
-	              ToPathAttr = GetFileAttributesW(pTempTo);
-	              pToFile[0] = '\\';
-	              if (retCode)
-	                goto shfileop_exit;
-	            }
-#else
-	          if (-1 == ToAttr)
-	          {
-#endif
-	            if (IsAttribDir(ToPathAttr))
-	            {
-	              if (pToTailSlash)
-	   	            pToTailSlash[0] = '\0';
-	              retCode = SHCreateDirectoryExW(NULL,pTempTo, NULL);
-	              ToAttr = GetFileAttributesW(pTempTo); /* for continuing */
-	              if (pToTailSlash)
-	   	            pToTailSlash[0] = '\\';
-#ifndef W98_FO_FUNCTION /* W2k */
-	                if (retCode)
-	                  goto shfileop_exit;
-#endif
-	            }
-	            if (-1 == ToAttr)
-	            {
-	              retCode = 0x10003;
+	              if (w2k == WOsVers)
+	                retCode = ERROR_ALREADY_EXISTS; /* w2k */
+	              else
+	                retCode = ERROR_INVALID_NAME; /* wXp */
+	              nFileOp.fAnyOperationsAborted |= TRUE;
 	              goto shfileop_exit;
 	            }
+	            lpFileName = &pToFile[lstrlenW(pToFile)];
+	            if (pToTailSlash)
+	            {
+	              pToTailSlash = lpFileName;
+	              lpFileName++;
+	            }
+	            ((DWORD*)lpFileName)[0] = '\0';
+	            retCode = SHCreateDirectoryExW(NULL,pTempTo, NULL);
 	          }
-	          if (IsAttribDir(ToAttr))
+	          else
+	          { /* only for < w2k, tested with w98se,nt40sp6 */
+	            if (IsAttribDir(ToPathAttr) || !b_SameRoot_MOVE || b_ToMask)
+	            { /* tested with w98se, partially nt40sp6, w2k(wXp). only w98se,nt40sp6 can loop */
+	              lpFileName = NULL;
+	              while ((lpFileName = StrRChrW(pTempTo,lpFileName, '\\'),
+	                     INVALID_FILE_ATTRIBUTES == ToAttr) &&
+	                     (':' != lpFileName[-1])) /* not begin with root, or end with root */
+	              {
+	                SetIfPointer(lpFileName, '\0');
+	                ToAttr = GetFileAttributesW(pTempTo); /* for continuing */
+	                SetIfPointer(lpFileName--, '\\');
+	              }
+	              while (lpFileName && lpFileName[1] && !retCode)
+	              {
+				    SetIfPointer(lpFileName,'\\');
+	                lpFileName = StrChrW(++lpFileName,'\\');
+	                SetIfPointer(lpFileName,'\0');
+	                retCode = SHCreateDirectoryExW(NULL,pTempTo, NULL);
+	              }
+	            }
+	          }
+	          if (retCode)
 	          {
-	            /* both are existing dirs, we (FO_)MOVE/COPY the contence */
-	            pToFile = SHFileStrCpyCatW(pTempFrom, NULL, wWildcardFile);
-	            nFileOp.fFlags &= ~FOF_MULTIDESTFILES;
-	            retCode = SHFileOperationW(&nFileOp);
-	            if ((FO_COPY == FuncSwitch) || retCode)
-	              continue;
-	            ((DWORD*)pToFile)[0] = '\0';
-	            nFileOp.wFunc =  ((level+1) << FO_LevelShift) + FO_DELETE;
-	            retCode = SHFileOperationW(&nFileOp);
+	            retCode = (ERROR_PATH_NOT_FOUND | 0x10000); /* nt40,w98se,w2k,wxp */
+	            goto shfileop_exit;
+	          }
+	          ToAttr = GetFileAttributesW(pTempTo);
+	          SetIfPointer(pToTailSlash,'\\');
+	          nFileOp.fFlags &= ~FOF_RENAMEONCOLLISION;
+	        }
+	        if (IsAttribDir(ToAttr))
+	        {
+	          /* both are existing dirs, we (FO_)MOVE/COPY the content */
+	          pToFile = SHFileStrCpyCatW(pTempFrom, NULL, wWildcardFile);
+	          nFileOp.fFlags &= ~FOF_MULTIDESTFILES;
+	          retCode = SHFileOperationW(&nFileOp);
+	          if ((FO_COPY == FuncSwitch) || retCode)
 	            continue;
-	          }
+	          ((DWORD*)pToFile)[0] = '\0';
+	          nFileOp.wFunc =  ((level+1) << FO_LevelShift) + FO_DELETE;
+	          retCode = SHFileOperationW(&nFileOp);
+	          continue;
 	        }
-	      } /* end-!b_MultiFrom */
-	    }
-
-#ifdef W98_FO_FUNCTION /* not in W2K, -> retCode = retCodeIsInvalid */
-	    if (b_FromMask && \
-	    /* we do not know, why (b_SameRoot_MOVE && b_ToMask && (-1 != ToPathAttr)) */
-	        (IsAttribDir(ToAttr) || (b_SameRoot_MOVE && b_ToMask)))
-#else
-	    if (b_FromMask && (-1 != ToPathAttr) && \
-	    /* we do not know, why (b_SameRoot_MOVE && b_ToMask && (-1 != ToPathAttr)) */
-	        (IsAttribDir(ToAttr) || (b_SameRoot_MOVE && b_ToMask)))
-#endif
-	    {
-	      /* FO_COPY/FO_MOVE with mask, FO_DELETE are solved lang before */
-	      hFind = FindFirstFileW(pFrom, &wfd);
-	      if (INVALID_HANDLE_VALUE == hFind)
-	      {
-	        /* the retcode for this case is unknown */
-	        retCode = 0x10007;
-	        goto shfileop_exit;
 	      }
-	      nFileOp.fFlags &= ~FOF_MULTIDESTFILES;
-	      pToFile = SHFileStrCpyCatW(pTempTo, NULL, wBackslash);
-	      do
-	      {
-	        lpFileName = wfd.cAlternateFileName;
-	        if (!lpFileName[0])
-	          lpFileName = wfd.cFileName;
-	        if (IsDotDir(lpFileName) ||
-	            (IsAttribDir(wfd.dwFileAttributes) && (nFileOp.fFlags & FOF_FILESONLY)))
-	          continue; /* next name in pTempFrom(dir) */
-	        SHFileStrCpyCatW(&pFromFile[1], lpFileName, NULL);
-	        retCode = SHFileOperationW (&nFileOp);
-	      } while(!retCode && FindNextFileW(hFind, &wfd));
-	      FindClose(hFind);
-	      continue;
-	    }
-	    /* W98 returns 0x75, W2K 0x4c7 */
+	    } /* end-!b_MultiFrom */
+
+shfileop_IsInvalid:
+	    if (!(b_SameRoot_MOVE) && (nt40 < WOsVers))
+	    {
+	      nFileOp.fAnyOperationsAborted |= TRUE;
+	    } /* endif */
+	    /* NT4.0,W98 returns 0x75, W2K,WXP 0x4c7 */
 	    retCode = retCodeIsInvalid;
 	    break;
@@ -1299,12 +1495,101 @@
 shfileop_exit:
 	if (pTempFrom)
-	  HeapFree(GetProcessHeap(), 0, pTempFrom);
+	  SHFree(pTempFrom);
 	TRACE("%s level=%ld AnyOpsAborted=%s ret=0x%lx, with %s %s%s\n",
-	      cFO_Name, level, nFileOp.fAnyOperationsAborted ? "TRUE":"FALSE",
+	      cFO_Name, level, (TRUE & nFileOp.fAnyOperationsAborted) ? "TRUE":"FALSE",
 	      retCode, debugstr_w(pFrom), pTo ? "-> ":"", debugstr_w(pTo));
 
+	if (0 == level)
+	{
+	  nFileOp.fAnyOperationsAborted &= TRUE;
+	  if (!(nFileOp.fFlags & FOF_WANTMAPPINGHANDLE))
+	  {
+	    SHFreeNameMappings((HANDLE)nFileOp.hNameMappings);
+	    nFileOp.hNameMappings = 0;
+	  }
+	} 
 	lpFileOp->hNameMappings         = nFileOp.hNameMappings;
 	lpFileOp->fAnyOperationsAborted = nFileOp.fAnyOperationsAborted;
 	return retCode;
+}
+
+/*************************************************************************
+ *
+ * SHNameTranslate HelperFunction for SHFileOperationA
+ *
+ * Translates a list of 0 terminated ASCII strings into Unicode. If *wString
+ * is NULL, only the necessary size of the string is determined and returned,
+ * otherwise the ASCII strings are copied into it and the buffer is increased
+ * to point to the location after the final 0 termination char.
+ */
+DWORD SHNameTranslate(LPWSTR* wString, LPCWSTR* pWToFrom, BOOL more)
+{
+	DWORD size = 0, aSize = 0;
+	LPCSTR aString = (LPCSTR)*pWToFrom;
+
+	if (aString)
+	{
+	  do
+	  {
+	    size = lstrlenA(aString) + 1;
+	    aSize += size;
+	    aString += size;
+	  } while ((size != 1) && more);
+	  /* The two sizes might be different in the case of multibyte chars */
+	  size = MultiByteToWideChar(CP_ACP, 0, aString, aSize, *wString, 0);
+	  if (*wString) /* only in the second loop */
+	  {
+	    MultiByteToWideChar(CP_ACP, 0, (LPCSTR)*pWToFrom, aSize, *wString, size);
+	    *pWToFrom = *wString;
+	    *wString += size;
+	  }
+	}
+	return size;
+}
+
+/*************************************************************************
+ * SHFileOperationA          [SHELL32.@]
+ *
+ * Function to copy, move, delete and create one or more files with optional
+ * user prompts.
+ *
+ * PARAMS
+ *  lpFileOp   [I/O] pointer to a structure containing all the necessary information
+ *
+ * NOTES
+ *  exported by name
+ */
+DWORD WINAPI SHFileOperationA(LPSHFILEOPSTRUCTA lpFileOp)
+{
+	SHFILEOPSTRUCTW nFileOp = *((LPSHFILEOPSTRUCTW)lpFileOp);
+	DWORD retCode = 0, size;
+	LPWSTR ForFree = NULL, /* we change wString in SHNameTranslate and can't use it for freeing */
+	       wString = NULL; /* we change this in SHNameTranslate */
+
+	TRACE("\n");
+	for (;;) /* every loop calculate size, second translate also, if we have storage for this */
+	{
+	  size = SHNameTranslate(&wString, &nFileOp.pFrom, TRUE); /* internal loop */
+	  if (FO_DELETE != (nFileOp.wFunc & FO_MASK))
+	    size += SHNameTranslate(&wString, &nFileOp.pTo, TRUE); /* internal loop */
+	  if ((nFileOp.fFlags & FOF_SIMPLEPROGRESS))
+	    size += SHNameTranslate(&wString, &nFileOp.lpszProgressTitle, FALSE); /* no loop */
+
+	  if (ForFree)
+	  {
+	    retCode = SHFileOperationW(&nFileOp);
+	    SHFree(ForFree); /* we can not use wString, it was changed */
+	    lpFileOp->hNameMappings         = nFileOp.hNameMappings;
+	    lpFileOp->fAnyOperationsAborted = nFileOp.fAnyOperationsAborted;
+	  }
+	  else
+	  {
+	    wString = ForFree = SHAlloc(size * sizeof(WCHAR));
+	    if (ForFree) continue;
+	    retCode = ERROR_OUTOFMEMORY;
+	    SetLastError(retCode);
+	  }
+	  return retCode;
+	}
 }
 
Index: trunk/src/shell32/shres.orc
===================================================================
--- trunk/src/shell32/shres.orc	(revision 10308)
+++ trunk/src/shell32/shres.orc	(revision 10314)
@@ -1,3 +1,3 @@
-/* $Id: shres.orc,v 1.14 2002-06-08 07:26:59 sandervl Exp $ */
+/* $Id: shres.orc,v 1.15 2003-11-12 14:05:13 sandervl Exp $ */
 /*
  * Top level resource file for Common Dialogs
@@ -134,5 +134,5 @@
         IDS_OPEN                "Open"
 }
-
+#if 1
 STRINGTABLE DISCARDABLE
 {
@@ -146,6 +146,8 @@
 	IDS_OVERWRITEFILE_TEXT "OverWrite File %1?"
 	IDS_OVERWRITEFILE_CAPTION "Confirm File OverWrite"
+	IDS_COPY_X_OF_TEXT "Copy%sof %s"
 #endif
 }
+#endif
 
 shv_accel ACCELERATORS
@@ -272,21 +274,21 @@
 */
 
-//#include "shell32_Ca.orc"
-//#include "shell32_Cs.orc"
-//#include "shell32_Da.orc"
-//#include "shell32_De.orc"
-//#include "shell32_Eo.orc"
-//#include "shell32_Es.orc"
-//#include "shell32_Fi.orc"
-//#include "shell32_Fr.orc"
-//#include "shell32_Hu.orc"
-//#include "shell32_It.orc"
-//#include "shell32_Ko.orc"
-//#include "shell32_Nl.orc"
-//#include "shell32_No.orc"
-//#include "shell32_Pl.orc"
-//#include "shell32_Pt.orc"
-//#include "shell32_Ru.orc"
-//#include "shell32_Sv.orc"
-//#include "shell32_Wa.orc"
-
+#include "resources\shell32_Ca.orc"
+#include "resources\shell32_Cs.orc"
+#include "resources\shell32_Da.orc"
+#include "resources\shell32_De.orc"
+#include "resources\shell32_Eo.orc"
+#include "resources\shell32_Es.orc"
+#include "resources\shell32_Fi.orc"
+#include "resources\shell32_Fr.orc"
+#include "resources\shell32_Hu.orc"
+#include "resources\shell32_It.orc"
+//#include "resources\shell32_Ko.orc"
+#include "resources\shell32_Nl.orc"
+#include "resources\shell32_No.orc"
+#include "resources\shell32_Pl.orc"
+#include "resources\shell32_Pt.orc"
+#include "resources\shell32_Ru.orc"
+#include "resources\shell32_Sv.orc"
+#include "resources\shell32_Wa.orc"
+
Index: trunk/src/shell32/shresdef.h
===================================================================
--- trunk/src/shell32/shresdef.h	(revision 10308)
+++ trunk/src/shell32/shresdef.h	(revision 10314)
@@ -1,3 +1,3 @@
-/* $Id: shresdef.h,v 1.10 2002-03-08 11:01:03 sandervl Exp $ */
+/* $Id: shresdef.h,v 1.11 2003-11-12 14:05:14 sandervl Exp $ */
 
 /*
@@ -54,4 +54,7 @@
 #define	IDS_OVERWRITEFILE_CAPTION 37
 #endif
+#ifdef __WIN32OS2__
+#define	IDS_COPY_X_OF_TEXT  200
+#endif
 
 #define IDS_SHV_INVALID_FILENAME_TITLE 28
