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 |
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 |
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 . |
All times are GMT +1. The time now is 10:38 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com