Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy files
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy files
Worked when I removed nul behind Bibl\ in line two and three.
Tom - thanks for all your help the last couple of days - my project is finished, Im happy and I hope my boss will be even happier. I'll buy you a beer on of these days..... Thank you very much. Knut Egil Sjøli NTE Steinkjer Norway "Tom Ogilvy" skrev i melding ... @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 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy files
Your welcome.
I tested a version of it in xl98 and it required the nul. But it may be different in an NT based system (2000, XP, 2003). Just test it in at least each version of operating systemyou will use it in. -- Regards, Tom Ogilvy "DS NTE" wrote in message ... Worked when I removed nul behind Bibl\ in line two and three. Tom - thanks for all your help the last couple of days - my project is finished, Im happy and I hope my boss will be even happier. I'll buy you a beer on of these days..... Thank you very much. Knut Egil Sjøli NTE Steinkjer Norway "Tom Ogilvy" skrev i melding ... @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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Copy from two files | Excel Programming | |||
copy many files into one | Excel Programming | |||
copy files | Excel Programming | |||
Copy Files | Excel Programming | |||
copy files from one dir to another | Excel Programming |