Re: calling a dos command in a program

Tech-Archive recommends: Fix windows errors by optimizing your registry



You could also use SHFileOperation to do this kind of thing.

Tom


"Ron H" <rnharsh@xxxxxxxxxx> wrote in message
news:45301d95$0$15917$8d2e0cab@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Look up system or _wsystem if you must use a command


int system( const char *command );

int _wsystem( const wchar_t *command );



"Chris Baker" <ChrisBaker@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:8790E041-B737-4B2A-9CDD-96950A694C54@xxxxxxxxxxxxxxxx
I want to call a command like "del xxx.txt" from within a vc++ (console
app)
program.

I've tried shellexecute but lo luck (below).

ShellExecute(NULL,_T("open"), _T("del"), _T("chb.txt"),_T(""), SW_SHOW);


-----------------
www.Newsgroup-Binaries.com - *Completion*Retention*Speed*
Access your favorite newsgroups from home or on the road
-----------------


.



Relevant Pages

  • Re: calling a dos command in a program
    ... Look up system or _wsystem if you must use a command ... int system(const char *command); ... I've tried shellexecute but lo luck. ...
    (microsoft.public.vc.mfc)
  • Command Line Arguments
    ... I am trying pass command line arguments using ShellExecute. ... other than using a character to act as a space like "_" and replace it in ... the other app? ...
    (microsoft.public.vb.general.discussion)
  • Re: Programming "efficiently" on given hardware - what does it mean really?
    ... >> in a command line world again. ... > launching an app, selecting menu items, hoping it does what ... In a GUI environment, use a RAD tool to whip up a quick, simple UI ...
    (comp.programming)
  • Re: Application starts too soon
    ... expecting a network connection to exist. ... > The application runs froma a batch file. ... Finally the command prompt arrives, ... > think the app tries to run, encounters an error, and exits. ...
    (microsoft.public.windowsxp.embedded)
  • Re: Application starts too soon
    ... Windows XPE site and looked thru the two XPE books and found nothing on this ... >> The application runs froma a batch file. ... >> The batch file has my exe followed by a Shutdown command ... >> think the app tries to run, encounters an error, and exits. ...
    (microsoft.public.windowsxp.embedded)