xcopy command prompting when I don't want it to - Techist - Tech Forum

Go Back   Techist - Tech Forum > Computer Software > Microsoft Windows and Software
Click Here to Login
Closed Thread
 
Thread Tools Display Modes
 
Old 03-27-2006, 07:46 PM   #1 (permalink)
Junior Techie
 
Join Date: Sep 2005
Posts: 72
Default xcopy command prompting when I don't want it to

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?
__________________

xr280xr is offline  
Old 03-27-2006, 07:50 PM   #2 (permalink)
Techie Beyond Description
 
Osiris's Avatar
 
Join Date: Jan 2005
Location: Kentucky
Posts: 36,817
Send a message via ICQ to Osiris Send a message via AIM to Osiris Send a message via MSN to Osiris Send a message via Yahoo to Osiris
Default

let me see the command
__________________

__________________
Osiris is offline  
Old 03-27-2006, 08:00 PM   #3 (permalink)
Techie Beyond Description
 
Osiris's Avatar
 
Join Date: Jan 2005
Location: Kentucky
Posts: 36,817
Send a message via ICQ to Osiris Send a message via AIM to Osiris Send a message via MSN to Osiris Send a message via Yahoo to Osiris
Default

del s:\scans\*.* /f /q

There is my example.......
__________________
Osiris is offline  
Old 03-28-2006, 12:42 AM   #4 (permalink)
Junior Techie
 
Join Date: Sep 2005
Posts: 72
Default

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.
xr280xr is offline  
Old 03-28-2006, 12:54 AM   #5 (permalink)

Triforcer
 
Baez's Avatar
 
Join Date: Sep 2005
Location: Toronto, Canada
Posts: 6,987
Default

i ran that command and it worked fine for me with my own files. must be something wrong with the file
__________________


Baez is offline  
Old 03-28-2006, 10:57 AM   #6 (permalink)
Junior Techie
 
Join Date: Sep 2005
Posts: 72
Default

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.
__________________

xr280xr is offline  
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -5. The time now is 07:22 AM.


Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.