Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 504
Default using write #1 to create a batch file

I am trying to create a simple batch file to run a clarion command for
specified IP addresses and output them to a text file. When I try this
method it puts the quotes in the .bat file and the command doesn't run when
the .bat file is activated... Any suggestion?

Open "c:\Program Files\EMC\Navisphere CLI\Temp.bat" For Output As #1
Write #1, "naviseccli - h 10.60.103.18 - scope 0 getlun - capacity
kevtest.txt"
Close
Shell "C:\Program Files\EMC\Navisphere CLI\Temp.bat"


Actually, what I've been trying to do is get the output from this command to
a worksheet. Is there a simpler way to do this?

Any help is appreciated!!
Kevin Green
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default using write #1 to create a batch file

Try using Print #1 instead.

--
Rick (MVP - Excel)



"Kevin" wrote in message
...
I am trying to create a simple batch file to run a clarion command for
specified IP addresses and output them to a text file. When I try this
method it puts the quotes in the .bat file and the command doesn't run
when
the .bat file is activated... Any suggestion?

Open "c:\Program Files\EMC\Navisphere CLI\Temp.bat" For Output As #1
Write #1, "naviseccli - h 10.60.103.18 - scope 0 getlun - capacity
kevtest.txt"
Close
Shell "C:\Program Files\EMC\Navisphere CLI\Temp.bat"


Actually, what I've been trying to do is get the output from this command
to
a worksheet. Is there a simpler way to do this?

Any help is appreciated!!
Kevin Green


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 504
Default using write #1 to create a batch file

That did the trick! So simple and yet so profound. :-)
Thanks a bunch for the help!

"Rick Rothstein" wrote:

Try using Print #1 instead.

--
Rick (MVP - Excel)



"Kevin" wrote in message
...
I am trying to create a simple batch file to run a clarion command for
specified IP addresses and output them to a text file. When I try this
method it puts the quotes in the .bat file and the command doesn't run
when
the .bat file is activated... Any suggestion?

Open "c:\Program Files\EMC\Navisphere CLI\Temp.bat" For Output As #1
Write #1, "naviseccli - h 10.60.103.18 - scope 0 getlun - capacity
kevtest.txt"
Close
Shell "C:\Program Files\EMC\Navisphere CLI\Temp.bat"


Actually, what I've been trying to do is get the output from this command
to
a worksheet. Is there a simpler way to do this?

Any help is appreciated!!
Kevin Green


.

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
batch file call from a macro - how ? and required batch format VB-rookie Excel Programming 4 September 6th 08 12:52 AM
Create/Write to an Excel File in a C# Windows Application PK9 Excel Programming 0 March 2nd 06 06:20 PM
Help To Create Batch/Macro Required R.VENKATARAMAN Excel Programming 0 January 16th 05 04:50 AM
Create a batch file from a number of Excel File Vinay[_2_] Excel Programming 0 September 8th 04 01:11 AM
Create and write a simple text file in Excel/VBA Thomas Wieser Excel Programming 4 April 13th 04 10:24 AM


All times are GMT +1. The time now is 04:32 PM.

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"