#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default 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   Report Post  
Posted to microsoft.public.excel.programming
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




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy from two files Annie Excel Programming 9 June 21st 05 08:41 PM
copy many files into one Gabriel[_3_] Excel Programming 3 September 2nd 04 03:29 PM
copy files Young-Hwan Choi Excel Programming 1 June 14th 04 03:06 AM
Copy Files desmondleow[_16_] Excel Programming 5 April 21st 04 08:11 PM
copy files from one dir to another rvik[_14_] Excel Programming 7 February 13th 04 01:30 PM


All times are GMT +1. The time now is 03:19 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"