How do you force copy to over write a file with asking any questions?

Feb 21, 2014
5
0
I use to be able to copy a file using the switch /y to force it to copy quietly however that doesn't seem to work. I don't see a switch to do that anymore and when I do put it in the copy command TCC ignores it.

Thanks for you help,
George
 
Apr 2, 2011
1,334
6
53
North Carolina, USA
COPY command - Copy files or directories

/Q - Don't display filenames, percentage copied, total number of files copied, etc. When used in combination with the /P option above, it will prompt for filenames but will not display the totals. This option is most often used in batch files. See also /T.
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
4,316
78
Albuquerque, NM
prospero.unm.edu
/Y still works for me, to suppress the overwrite prompt:

Code:
C:\Bin\JPSDK\Scrolly>ver /r

TCC  26.02.42 x64   Windows 10 [Version 10.0.17763.1397]
TCC Build 42   Windows 10 Build 17763
Registered to COE-DN00071735

C:\Bin\JPSDK\Scrolly>copy /v /g x64\Release\Scrolly.dll u:\
C:\Bin\JPSDK\Scrolly\x64\Release\Scrolly.dll =>! U:\Scrolly.dll (Replace) (Y/N/A/R)? Y

     1 file copied

C:\Bin\JPSDK\Scrolly>copy /v /g /y x64\Release\Scrolly.dll u:\
C:\Bin\JPSDK\Scrolly\x64\Release\Scrolly.dll => U:\Scrolly.dll

     1 file copied

C:\Bin\JPSDK\Scrolly>