Jump to content

Stdoutread doesn't read al output


EDD
 Share

Recommended Posts

I'm using the following script to find a file on a harddrive.

#include <Constants.au3>
$foo = Run(@ComSpec & " /c dir *.pst /s", @SystemDir, @SW_HIDE, 2 + 4)

While 1
    $line = StdoutRead($foo)
    If @error Then ExitLoop
    ConsoleWrite ($line)
Wend

The problem is, that it only output the first two lines of the command.

Anyone got a idea why it's not outputting the complete text?

Edited by EDD
Link to comment
Share on other sites

Are you sure the *.pst files are in the path from @systemdir. Try @UserProfileDir or a hardcoded path to confirm.

Lol my fault. Didn't realize it start searching from that directory. Changed it to c:\ and it works fine.

Thanx for pointing at it.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...