1.

Solve : bat file problem?

Answer»

I have a bat file that I email to users to have them update some macro files on their LOCAL machines. The bat file uses XCOPY command as follows:

xcopy s:\Macros\Macro.ebm C:\docume~1\macros\Macro.ebm /y


It works fine and copies the files to the correct location, but it always asks if it is a file or directory that I am copying and the users have to type 'F'. Is there a way to avoid this and either pass 'F' to the prompt or another code to add in my command to tell it is a file?

Thanks,
Ben
Not exactly sure why you would be causing this in all honesty. Windows should know that this is a file and not a folder and not even prompt a user.

Have you considered using the "copy" command instead of the "xcopy" command?DOH!

I was just used to using xcopy in the past and never had a problem with it, MAINLY for the deployment of database frontends. I switched to copy and it worked without the prompt.

Thanks for the help!
Ben



Discussion

No Comment Found