Computer Hope

Microsoft => Microsoft DOS => Topic started by: ABuNeNe on June 19, 2009, 12:28:27 AM

Title: xcopy no prompt
Post by: ABuNeNe on June 19, 2009, 12:28:27 AM
I'm doing a copy with the following command to perform a copy.

Code: [Select]
xcopy /s /c /d /e /h /i /r /k /y /q

I'm encountering "Are you sure (Y/N)?" prompt. Any idea how to I remove the prompt?
Title: Re: xcopy no prompt
Post by: billrich on June 19, 2009, 04:38:21 AM
xcopy  /?

/Y           Suppresses prompting to confirm you want to overwrite an
               existing destination file.
Title: Re: xcopy no prompt
Post by: squall_01 on June 19, 2009, 05:40:25 AM
dos isnt case senitive, have you tried it with just /y?  That should tell it to replace the file no matter.

Title: Re: xcopy no prompt
Post by: Helpmeh on June 19, 2009, 07:25:03 PM
This sort of falls in the same catagory, I'm using XCOPY to copy directoryies and it keeps asking me for directories or files, can I make it auto-choose directories?
Title: Re: xcopy no prompt
Post by: Dusty on June 19, 2009, 08:17:42 PM
Helpmeh - ensure the destination path ends with a backslash to indicate a directory.

e.g. xcopy ....c:\sourcepath d:\destinationpath\
Title: Re: xcopy no prompt
Post by: billrich on June 19, 2009, 09:26:56 PM
Helpme,


xcopy /?
.
.
.
  /S           Copies directories and subdirectories except empty ones.
.
.
.

Title: Re: xcopy no prompt
Post by: Helpmeh on June 20, 2009, 06:17:45 AM
@Dusty
Thanks, that should help!

@Billrich
I want to copy the empty directories.
Title: Re: xcopy no prompt
Post by: squall_01 on June 20, 2009, 07:14:23 AM
/ indicates the last dir at the end of the desenation an source
Title: Re: xcopy no prompt
Post by: Helpmeh on June 20, 2009, 08:06:37 AM
Thanks squall, oh and btw, you spelled guardian wrong.
Title: Re: xcopy no prompt
Post by: squall_01 on June 20, 2009, 04:43:53 PM
figures, I was tring to think of something but it evaded me.