Page 1 of 1 1
Topic Options
#171215 - 2006-12-08 06:21 AM Running shell commands
Caligari Offline
Fresh Scripter

Registered: 2006-12-08
Posts: 7
Hi,
I'm sure this falls under the 'stupid newbie questions' category, but bear with me..

When running a command via shell or run (I'm not too sure on the distinction) complex statements seem to fail. Single statements like
Code:
Shell 'ipconfig'
work as expected, whereas something like

Code:
Shell 'ipconfig > c:\test.cmd'


doesn't execute.. my first guess was a quotes problem, but I can't seem to find the right combination. The same command runs fine when run manually.

Thanks in advance.

Top
#171216 - 2006-12-08 06:25 AM Re: Running shell commands [Re: Caligari]
Allen Administrator Offline
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4572
Loc: USA
Something like:

Code:
shell '%comspec% /c ipconfig > c:\test.log' 


To pipe/redirect you must specify the cmd shell.

Also look in the FAQ section for a document regarding Shell and Run.
_________________________
(... better days ahead)

Top
#171217 - 2006-12-08 06:41 AM Re: Running shell commands [Re: Allen]
Caligari Offline
Fresh Scripter

Registered: 2006-12-08
Posts: 7
Thanks very much, much clearer now.
Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 2220 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.062 seconds in which 0.033 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org