From 34d7d91bc56f32602430532646f092701a350fe0 Mon Sep 17 00:00:00 2001 From: Abdellah El Morabit Date: Sat, 22 Feb 2025 22:44:14 +0100 Subject: still thinking on how to properly implement this --- main.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'main.c') 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) { -- cgit v1.2.3-70-g09d2