Sign in to follow this  
Followers 0
EDD

Stdoutread doesn't read al output

3 posts in this topic

#1 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

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

Edited by picaxe

Share this post


Link to post
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.

Share this post


Link to post
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
Sign in to follow this  
Followers 0