Glam Prestige Journal

Bright entertainment trends with youth appeal.

I have a backup folder that i should copy it weekly , so i use a batch file in the task sheduler of Windows contains this line

xcopy /s "C:\backupMai" "\\myserver\backup$\logFile\c022456"

but when the next week come the script doesn't run and always show this message : Overwrite \myserver\backup$\logFile\c022456\MFU1.dat (Yes/No/All)?

I want to overwrite the whole contains of folder what i should be add to my code

1 Answer

If I want to overwrite the entire contents of the folder, what should I add to my code?

You may want to try adding the /Y option:

xcopy /s /y "C:\backupMai" "\\myserver\backup$\logFile\c022456"

As noted in this SS64 page on XCOPY, the /Y option suppresses the prompt to confirm overwriting a file.

2

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy