xcopy command prompting when I don't want it to

Status
Not open for further replies.

xr280xr

Baseband Member
Messages
72
Hi, I'm trying to write a batch file that uses xcopy to backup files. Every time it tries to copy a new file that doesn't exist it asks me if it is a file or directory. Is there a way to make it see that if there's a file extension it's a file otherwise it's a directory so that it will stop prompting me?? I've tried the /I switch which I guess is for if the directory being copied into doesn't exist. I am not adding the /P switch and have the /Y swtich so I dunno what else to do to stop the dang prompting. Any help?
 
Here is my original command although I've tried several different switch combinations:

Code:
xcopy "D:\My Documents\crystal_quest.zip" "J:\New Folder\crystal_quest.zip" /E /C /I /Y

So when I run that it does this:

Code:
Does J:\New Folder\crystal_quest.zip specify a file name
or directory name on the target
(F = file, D = directory)?

J:\New Folder already exists. If crystal_quest.zip already exists it will overwrite w/out a prompt but if it doesn't exist, as in the example above, I get that prompt. It makes no sense to me why it wouldn't assume it's a file if it has a FILE extension.

I don't really understand your example. Why delete?

Thanks.
 
Can you show me the command that worked for you without prompting?

It works fine for me with directories, just not individual files. I must just be doing something wrong but I don't know what.
 
Status
Not open for further replies.
Back
Top Bottom