Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: bat file problem  (Read 2403 times)

0 Members and 1 Guest are viewing this topic.

bdb04

  • Guest
bat file problem
« on: October 06, 2005, 11:55:11 AM »
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

Computer Hope Admin

  • Administrator


  • Prodigy

    Thanked: 248
    • Yes
    • Yes
    • Yes
    • Computer Hope
  • Certifications: List
  • Computer: Specs
  • Experience: Guru
  • OS: Windows 10
Re: bat file problem
« Reply #1 on: October 06, 2005, 03:48:03 PM »
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?
Everybody is a genius. But, if you judge a fish by its ability to climb a tree, it will spend its whole life believing that it is stupid.
-Albert Einstein

bdb04

  • Guest
Re: bat file problem
« Reply #2 on: October 06, 2005, 04:01:39 PM »
DOH!  ;D

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