furniturepro2012
furniturepro2012

Reputation: 11

Windows Batch File using xcopy. Prompts on screen for Y, N, or A

I wrote a batch file to copy files from a network share to the C:\ drive. When I have this file run automatically each day, it asks the user to respond Y, N, or A to replace files already in the directory.

I am trying to make this automatic as possible. I would like for it to answer "A" for all. Could someone please help me with the syntax to do this? So far I have:

@Echo off

xcopy "S:\Files" "C:\Files" /e /i

Upvotes: 1

Views: 1405

Answers (1)

gariel
gariel

Reputation: 687

Use the /Y parameter, like:

xcopy asd1.txt asd2.txt /Y

Upvotes: 3

Related Questions