CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 1999
    Posts
    8

    Using shellexecute or createprocess, or what?

    I'm trying to find a way to execute a command (something like "dir *.*") in Win98. I've looked up the documentation (all that I have at least) on ShellExecute and CreateProcess and seem none the wiser. Should I use one of these functions, or should I use something else? And how?

    Thanks in advance,
    Thranil


  2. #2
    Join Date
    May 1999
    Posts
    69

    Re: Using shellexecute or createprocess, or what?

    Either one of these functions is fine if you want to execute another process. I tend to always use CreateProcess.

    However, if all you're trying to do is enumerate files within your directory structure you do not need to shell out to another process to do this. You should use the File enumeration APIs within Win32 SDK. These are wrapped up within a CFileFind class (I think) within MFC.


  3. #3
    Join Date
    Apr 1999
    Posts
    8

    Re: Using shellexecute or createprocess, or what?

    Well, essentially what I am trying to do is take a look a the directory tree and filter out unwanted directories. Is there an easier way to do this than pipe a formated tree from a DOS command (not DIR) into a file and then search it?


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured