Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ShellExecute() and Redirection
Message
 
 
To
21/04/1998 11:13:17
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00093664
Message ID:
00096553
Views:
19
Bill,

I just came across this, and it indeed works like a charm

? ShellExecute( hDCScreen, "open", "command.com", "/c dir c:\*.* >>test.txt", "c:\", 1 )

You have to use >> instead of just one

>Is it possible to use ShellExecute() to execute a DOS program AND redirect the DOS program's output to a file. I have not been able to get this to work with ShellExecute() by placing the redirection operator and file name in the Parameters variable. However, I have been able to get this to work with WinExec(), but not ShellExecute().
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform