+\r
+ DestFileName = Argv[2];\r
+ FileNameLen = AsciiStrLen (DestFileName);\r
+\r
+ // Check if the destination file name looks like a directory\r
+ if ((DestFileName[FileNameLen-1] == '\\') || (DestFileName[FileNameLen-1] == ':')) {\r
+ // Set the pointer after the source drive (eg: after fs1:)\r
+ SrcPtr = AsciiStrStr (Argv[1], ":");\r
+ if (SrcPtr == NULL) {\r
+ SrcPtr = Argv[1];\r
+ } else {\r
+ SrcPtr++;\r
+ if (*SrcPtr == '\\') {\r
+ SrcPtr++;\r
+ }\r
+ }\r
+\r
+ if (*SrcPtr == '\0') {\r
+ AsciiPrint("Source file incorrect.\n");\r
+ }\r
+\r
+ // Skip the Source Directories\r
+ while (1) {\r
+ SrcFileName = SrcPtr;\r
+ SrcPtr = AsciiStrStr (SrcPtr,"\\");\r
+ if (SrcPtr != NULL) {\r
+ SrcPtr++;\r
+ } else {\r
+ break;\r
+ }\r
+ }\r
+\r
+ if (*SrcFileName == '\0') {\r
+ AsciiPrint("Source file incorrect (Error 2).\n");\r
+ }\r
+\r
+ // Construct the destination filepath\r
+ DestFileName = (CHAR8*)AllocatePool (FileNameLen + AsciiStrLen (SrcFileName) + 1);\r
+ AsciiStrCpy (DestFileName, Argv[2]);\r
+ AsciiStrCat (DestFileName, SrcFileName);\r
+ }\r
+\r