+ strcpy(newdestName, destName);
+ if ( srcDirFlag == TRUE ) {
+ strcat(newdestName, strstr(fileName, srcName) + strlen(srcName));
+ }
+
+ if (destDirFlag==TRUE && srcDirFlag == FALSE) {
+ if (newdestName[strlen(newdestName)-1] != '/' ) {
+ strcat(newdestName, "/");
+ }
+ strcat(newdestName, srcName);
+ }
+
+ return (copyFile(fileName, newdestName, TRUE, TRUE));
+}
+
+static int rmfileAction(const char *fileName, struct stat* statbuf)
+{
+ if (unlink( fileName) < 0 ) {
+ perror( fileName);
+ return ( FALSE);
+ }
+ return ( TRUE);
+}
+
+static int rmdirAction(const char *fileName, struct stat* statbuf)
+{
+ if (rmdir( fileName) < 0 ) {
+ perror( fileName);
+ return ( FALSE);
+ }
+ return ( TRUE);
+}
+
+
+extern int mv_main(int argc, char **argv)
+{