summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/main.c b/main.c
index b6d8828..d6f6dfd 100644
--- a/main.c
+++ b/main.c
@@ -179,8 +179,15 @@ void copy_files(const char *arg) {
fclose(pold_file);
}
-void move_files(const char *arg) {
- printf("move file");
+void move_files(const struct split_arg argument) {
+ if (remove(argument.source) != 0) {
+ perror("failed while trying to move the file");
+ }
+ // Create a file
+ FILE *pFile = fopen(argument.destination, "w");
+
+ // Close the file
+ fclose(pFile);
}
void clear(const char *arg) {