Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
run command with > to logfile
#2
Try function system().

The system function executes an internal operating system command, or an .EXE, .COM (.CMD in Windows NT) or .BAT file from within a C program rather than from the command line.

The system function finds the command interpreter, which is typically CMD.EXE in the Windows NT operating system or COMMAND.COM in Windows. The system function then passes the argument string to the command interpreter.

Declaration:
dll# msvcrt system $cmd

Usage:
system "C:\Program Files\tivoli\tsm\baclient\dsmc.exe i > d:\data\logfile.log"


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)