You can also prepend echo F| to the command.
This is necessary when the /I switch doesn't apply, e.g. when copying a single file.
Main Topics
Browse All TopicsHi I'm running the command below on Windows Server 2003
C:\Backup>XCOPY *.BAK A.BKK /Y
But it always comes up with the following prompt
Does A.BKK specify a file name
or directory name on the target
(F = file, D = directory)?
How can I force accept as a file?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
I don't use xcopy a lot so am not a guru on this... but it would appear that the syntax is confusing. The *.bak infers one or more files with a .BAK extender. If thats the case then I don't think that it's possible to use xcopy to copy more than one file into another single file; which is probably what's causing xcopy to kick on the prompt. Typically if I saw a copy command with a source file of *.bak I would assume that either you were going to copy the file(s) to another folder or to a series of files where the destination is *.bkk. I think that this is what's causing the confusion.
I would suggest either removing the * in the source file name or putting a * in the destination file name and/or copying all of the bak files to another folder for easy storage and access.
Well perhaps I should explain the situation ... and maybe someone can offer a better solution or advice ...
I've installed SQL server for my client. There's a (full) backup procedure which creates .BAK file in a directory MSSQLBACKUP with date and time incorporated in the filename. After this a tape backup runs to preserve the file in case the worst should happen
A batch file runs before the SQL server backup to delete existing .BAK files from MSSQLBACKUP so we don't end up with a huge collection of .BAK files
When I explained this to the client he came over all 'concerned' and pointed out that suppose they find that the tape backup didn't work and the SQL Server backup didn't work then the batch file will have deleted the only surviving .BAK file
Hence, before I do the deletion i'm trying to copy the single .BAK file into a file called A.BKK so that DEL *.BAK doesn't remove it and we allways have a copy of the last .BAK file ... I think it's overkill myself, but hey ...
Have you tried using Robocopy?
ROBOCOPY Syntax Example:
Notes:
- Robocopy does not copy over "Shared" Permissions
- Security Permissions from Source Folder will overwrite Permissions on Desination Folder
- You need to install rktools.exe
Example:
- Write down appropriate Share Permissions on "Students" on FILESERVERNAME
- Create "Students" Folder on FILESERVERNAME and set Share Permissions
- You do not have to worry about any Security Permissions, because they will be copied over.
Syntax:
C:\>robocopy \\FILESERVERNAME\students \\NEWFILESERVERNAME\studen
Business Accounts
Answer for Membership
by: ittogoPosted on 2009-01-28 at 08:49:15ID: 23488381
Try XCOPY *.BAK A.BKK /Y /I