Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I suppress xcopy prompt F for folder D for directory 3

Status
Not open for further replies.

ToyFox

Programmer
Jan 24, 2009
161
US
I am using XCOPY in a batch file (running out of the scheduler) to copy a folder. When it starts I am prompted to enter "F" for file or "D" for directory.
How can I suppress this....because I want this routine to run at night. Thanks
 
Did you try looking in the help for the xcopy command?
xcopy /?

Anyway:

Try the /I switch. Assuming the answer is always a directory.


----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Sounds like that is what I am looking for. Thanks
 
I tried the /I but it did not change. I still get prompted to Overwrite files Y/N/All.
 
Well that's a different thing to what you had asked before.

The /Y switch should help you with that one.

again xcopy /? would have listed all the switches available for he xcopy command.


----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
From an earlier version, following the destination with a \ indicated a folder, as in:
xcopy source\*.* destination\

Ed Fair
Give the wrong symptoms, get the wrong solutions.
 
In Windows XP you can open the Windows-based help file for all DOS commands by pasting this line into the 'run' box:

%windir%\hh.exe mk:mad:MSITStore:%windir%\Help\ntcmds.chm::/ntcmds.htm

You can also create a shortcut with that line as its 'target'.

It's a tip I got from bcastner and I've found it invaluable!

Nelviticus
 
Very Nifty Nelviticus (and bcastner); have a star.

I see some commands that I've forgotten about over the years!

sam

 
Hm, Edfair was the first to write up the correct answer, a star for you!

HTH
TonHu
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top