Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ron Ron is offline
external usenet poster
 
Posts: 250
Default Bat file called from macro addressing network drives - NOT!

I have a bat file on a network drive that manipulates data files on a network
drive. However, when I try to run that bat file from a macro, I get:
\\oslo\common\ccstat
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported. Defaulting to the windows directory.

The path above is correct, so he recognizes it. I have the drives mapped as
drive letters also.

So how do I trick this thing to run my bat file from a macro? Or can I?

Ron
(BTW, thought I sent this yesterday, so if it shows up twice, I
apologize....I know, I know, if he can't post a question, how can he do VBA?)
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Bat file called from macro addressing network drives - NOT!

What code did you use to try and "run" your BAT file?

--
Rick (MVP - Excel)


"Ron" wrote in message
...
I have a bat file on a network drive that manipulates data files on a
network
drive. However, when I try to run that bat file from a macro, I get:
\\oslo\common\ccstat
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported. Defaulting to the windows directory.

The path above is correct, so he recognizes it. I have the drives mapped
as
drive letters also.

So how do I trick this thing to run my bat file from a macro? Or can I?

Ron
(BTW, thought I sent this yesterday, so if it shows up twice, I
apologize....I know, I know, if he can't post a question, how can he do
VBA?)


  #3   Report Post  
Posted to microsoft.public.excel.programming
Ron Ron is offline
external usenet poster
 
Posts: 250
Default Bat file called from macro addressing network drives - NOT!

Call Shell("cmd.exe /c T:\all.bat 10-06-09", 1)

I did it with and without the call statement.

Ron

"Rick Rothstein" wrote:

What code did you use to try and "run" your BAT file?

--
Rick (MVP - Excel)


"Ron" wrote in message
...
I have a bat file on a network drive that manipulates data files on a
network
drive. However, when I try to run that bat file from a macro, I get:
\\oslo\common\ccstat
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported. Defaulting to the windows directory.

The path above is correct, so he recognizes it. I have the drives mapped
as
drive letters also.

So how do I trick this thing to run my bat file from a macro? Or can I?

Ron
(BTW, thought I sent this yesterday, so if it shows up twice, I
apologize....I know, I know, if he can't post a question, how can he do
VBA?)



  #4   Report Post  
Posted to microsoft.public.excel.programming
Ron Ron is offline
external usenet poster
 
Posts: 250
Default Bat file called from macro addressing network drives - NOT!

Sorry, without the call staement I used X =

"Ron" wrote:

Call Shell("cmd.exe /c T:\all.bat 10-06-09", 1)

I did it with and without the call statement.

Ron

"Rick Rothstein" wrote:

What code did you use to try and "run" your BAT file?

--
Rick (MVP - Excel)


"Ron" wrote in message
...
I have a bat file on a network drive that manipulates data files on a
network
drive. However, when I try to run that bat file from a macro, I get:
\\oslo\common\ccstat
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported. Defaulting to the windows directory.

The path above is correct, so he recognizes it. I have the drives mapped
as
drive letters also.

So how do I trick this thing to run my bat file from a macro? Or can I?

Ron
(BTW, thought I sent this yesterday, so if it shows up twice, I
apologize....I know, I know, if he can't post a question, how can he do
VBA?)



  #5   Report Post  
Posted to microsoft.public.excel.programming
Ron Ron is offline
external usenet poster
 
Posts: 250
Default Bat file called from macro addressing network drives - NOT!

It has been solved. I needed to change directory in the bat file to the
network drive. Then all works as advertised.

Thanks, anyway guys

"Ron" wrote:

Sorry, without the call staement I used X =

"Ron" wrote:

Call Shell("cmd.exe /c T:\all.bat 10-06-09", 1)

I did it with and without the call statement.

Ron

"Rick Rothstein" wrote:

What code did you use to try and "run" your BAT file?

--
Rick (MVP - Excel)


"Ron" wrote in message
...
I have a bat file on a network drive that manipulates data files on a
network
drive. However, when I try to run that bat file from a macro, I get:
\\oslo\common\ccstat
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported. Defaulting to the windows directory.

The path above is correct, so he recognizes it. I have the drives mapped
as
drive letters also.

So how do I trick this thing to run my bat file from a macro? Or can I?

Ron
(BTW, thought I sent this yesterday, so if it shows up twice, I
apologize....I know, I know, if he can't post a question, how can he do
VBA?)


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
Mapped vs Network drives Greg Excel Worksheet Functions 2 January 12th 10 07:16 PM
Hyperlinking on Network drives mmc308 Excel Worksheet Functions 2 February 20th 07 01:53 PM
Network Drives Keith New Users to Excel 2 July 6th 06 10:38 PM
Network Drives Nick S[_7_] Excel Programming 2 August 11th 05 04:44 PM
Network drives [email protected] Excel Programming 0 July 17th 03 04:37 AM


All times are GMT +1. The time now is 12:35 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"