Package: mtools Version: 4.0.10-1 mcopy will still ask for confirmation, even if you pipe /dev/null into it.
The attached patch fixes the issue for me, but I am not sure of whether it may have other implications.
Index: mtools-4.0.10/tty.c =================================================================== --- mtools-4.0.10.orig/tty.c 2009-08-20 15:33:41.000000000 +0100 +++ mtools-4.0.10/tty.c 2009-08-20 15:45:34.000000000 +0100 @@ -171,6 +171,10 @@ { if(notty) return NULL; + if ( !isatty(0) ){ + notty = 1; + return NULL; + } if (tty == NULL) { ttyfd = open("/dev/tty", O_RDONLY); if(ttyfd >= 0) { @@ -178,10 +182,6 @@ } } if (tty == NULL){ - if ( !isatty(0) ){ - notty = 1; - return NULL; - } ttyfd = 0; tty = stdin; }