Page 1 of 1 1
Topic Options
#124097 - 2004-07-28 07:19 PM How do I capture output of 'command' or 'shell' commands
Ash Offline
Fresh Scripter

Registered: 2004-05-05
Posts: 9
All,

I'm running an FTP command from KIX using shell command (or could use command too). I'm feeding FTP itself a command file to login, change directory, etc.I want to capture the output of these command (i'm running FTP so it's verbose), but the output doesn't appear in thx KIX DOS box (i haven't setconsole hide). So, how do i redirect / capture this output in a file?

Many thanks

Ash

Top
#124098 - 2004-07-28 07:26 PM Re: How do I capture output of 'command' or 'shell' commands
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
How about using RedirectOutput()?
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#124099 - 2004-07-28 07:31 PM Re: How do I capture output of 'command' or 'shell' commands
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Never mind... Brain fart... probably would not work. What exactly are you trying to do and what do you need captured?
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#124100 - 2004-07-28 07:50 PM Re: How do I capture output of 'command' or 'shell' commands
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
what about like -

dir c:\*.* > c:\capture.txt

I know this is not the FTP you are looking for.

Remember, if you do a single ">" it will over-write any text capture. If you want to append, do a ">>".

Thanks,

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#124101 - 2004-07-29 04:32 AM Re: How do I capture output of 'command' or 'shell' commands
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Why even capture the output? I'd rather evaluate error codes to see whether the FTP comands are successful or use the various FTP UDFs.
_________________________
There are two types of vessels, submarines and targets.

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
1 registered (Henriques) and 2516 anonymous users online.
Newest Members
fgarcia, Viginette, ManuvdWielNL, Sir_Barrington, batdk82
17889 Registered Users

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

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