Merci jmv d'avoir pris la peine d'essayer.
Mon printf m'affiche la bonne commande. J'ai l'impression que le problème provient du code retour de la fonction system. La fonction system renvoie la valeur -1. Un test est effectuté dans mon code pour arrêter le programme dans ce cas :
	
	if (system(cmdSystem) == -1) exit;
 Dans la doc Linux, j'ai trouvé :
	
		
			
			
				Description
system() executes a command specified in command by calling /bin/sh -c command, and returns after the command has been completed. During execution of the command, SIGCHLD will be blocked, and SIGINT and SIGQUIT will be ignored. 
Return Value
The value returned is -1 on error (e.g. fork() failed), and the return status of the command otherwise.
			
		
 
	 
 J'ai enlever la condition et j'ai constaté que mon fichier est bien copié.
Je ne comprend pas le sens de ce code retour.
						
					
Partager