Thread: Copy files
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Copy files

@Echo Off
IF EXIST C:\Programfiler\Microsoft Office\Office\Bibl\nul goto ONE
IF EXIST C:\Programfiler\Microsoft Office\Office10\Bibl\nul goto TWO
copy w:\NTEaddin\NTEaddin.xla C:\Programfiler\"Microsoft
Office"\Office11\Bibl\
GOTO END
:TWO
copy w:\NTEaddin\NTEaddin.xla C:\Programfiler\"Microsoft
Office"\Office10\Bibl\
goto END
:ONE
copy w:\NTEaddin\NTEaddin.xla C:\Programfiler\"Microsoft
Office"\Office\Bibl\
:END
ECHO DONE

--
Regards,
Tom Ogilvy

"DS NTE" wrote in message
...
Sorry I know this is not the correct newsgroup,but you are all so extremly
helpfull so I will give it a try.

I'm close to finishing my project, theres just one small problem. My boss
want me to make a bat-file that copies my xla from a server to each users

PC
(C:\Programfiler\Microsoft Office\Office\Bibl\), yes the boss has

instructed
me to use this folder. The problem is that some have folder Office, some
have folder Office10, and some have folder Office11. How can I use a
wildcard in the folder name.

This command works great if the folder is named Office but not when it is
named Office10
copy w:\NTEaddin\NTEaddin.xla C:\Programfiler\"Microsoft
Office"\Office\Bibl\


knut