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!

Stop XCOPY (F=file, D=directory)? prompt

Status
Not open for further replies.
M

Member 310024

Guest
Is there some setting I can use with the XCOPY command, to make it assume a file (as opposed to a directory), and therefore stop it prompting every time for that info?
 
The /S /E /V /Y /H switchs do stop this :-
Does file.ext specify a file name
or a directory name on the target
(F = file, D = directory)?

 
You could have ended the subdir-name with a \ so the name would not have implied ambigously a file or directory ;-)

HTH
TonHu
 
Xcopy

Copies files and directories, including subdirectories.

Syntax
xcopy Source [Destination] [/w] [/p] [/c] [/v] [/q] [/f] [/l] [/g] [/d[:mm-dd-yyyy]] [/u] [/i] [/s [/e]] [/t] [/k] [/r] [/h] [{/a|/m}] [/n] [/o] [/x] [/exclude:file1[+[file2]][+[file3]] [{/y|/-y}] [/z]

[green]<excerpt>[/green]
• Default value for Destination

If you omit Destination, the xcopy command copies the files to the current directory.

• Specifying whether Destination is a file or directory

If Destination does not contain an existing directory and does not end with a backslash (\), the following message appears:

[blue]Does destination specify a file name
or directory name on the target
(F = file, D = directory)?
Press F if you want the file or files to be copied to a file. Press D if you want the file or files to be copied to a directory. [/blue]

You can suppress this message by using the /i command-line option, which causes xcopy to assume that the destination is a directory if the source is more than one file or a directory.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top