Anwering "F" in a batch file - Is this a file or directory?

FOR /F "TOKENS=1* DELIMS= " %%A IN ('DATE/T') DO SET CDATE=%%B
FOR /F "TOKENS=1,2 eol=/ DELIMS=/ " %%A IN ('DATE/T') DO SET mm=%%B
FOR /F "TOKENS=1,2 DELIMS=/ eol=/" %%A IN ('echo %CDATE%') DO SET dd=%%B
FOR /F "TOKENS=2,3 DELIMS=/ " %%A IN ('echo %CDATE%') DO SET yyyy=%%B
SET date=%mm%%dd%%yyyy%
cd "C:\Program Files\MySQL\MySQL Server 4.1\bin"
mysqldump --user=root --password=somepwd elearn > elearn.sql
XCOPY /y /f elearn.sql "C:\ITD__DATA\elearnDB-mysqlFormat-%DATE%.sql"

REM HERE IS WHERE I AM PROMPTED THE FIRST TIME!

DEL elearn.sql
cd "C:\Documents and Settings\Administrator\Desktop\backupElearn"
NET STOP /y "IIS Admin Service"
"C:\Program Files\7-Zip\7z.exe" a -tzip archive.zip @listfile_.txt
NET START "IIS Admin Service"
NET START "Simple Mail Transport Protocol (SMTP)"
NET START "World Wide Web Publishing Service"
XCOPY /y /f archive.zip e:\bax2BPulled\elearnComplete-%DATE%.zip

REM HERE IS WHERE I AM PROMPTED THE SECOND TIME!

DEL archive.zip
DEL "C:\ITD__DATA\elearnDB-mysqlFormat-%DATE%.sql"
EXIT



When running the above batch file I am prompted 2 separate times "Is this a file or directory" (happens when creating/copying files).

What can I add to the batch file that will auto-answer "F" for file? As it is I have to manually type "F" for the batch to proceed.
LVL 2
smetterdAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dufo G. BelskiRetired bureaucrat/desktop supportCommented:
I think you can use echo, as in

echo f | XCOPY /y /f elearn.sql "C:\ITD__DATA\elearnDB-mysqlFormat-%DATE%.sql"  where | is the pipe character above the backslash.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows 2000

From novice to tech pro — start learning today.