Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
batch file call from a macro - how ? and required batch format | Excel Programming | |||
Create/Write to an Excel File in a C# Windows Application | Excel Programming | |||
Help To Create Batch/Macro Required | Excel Programming | |||
Create a batch file from a number of Excel File | Excel Programming | |||
Create and write a simple text file in Excel/VBA | Excel Programming |