Sign in to follow this  
Followers 0
Xand3r

Help pls fast

3 posts in this topic

CODE
#include <File.au3>

$dir="C:"

Global $path=$dir

FileChangeDir($dir)

scan()

Func scan()

$a=_FileListToArray (@WorkingDir ,"*" , 2 )

If @error=4 Then;@error=4 dak nu gaseste foldere

$b=_FileListToArray(@WorkingDir , "*" , 1)

For $j=1 to $b[0]

FileWrite(@DesktopDir&"\lista.txt", $path&"\"&$b[$j]&@CRLF)

Next

SetError(0)

ElseIf @error=0 Then

For $i=1 to $a[0]

$path=$path&$a[$i]

FileChangeDir($path)

scan()

Next

EndIf

EndFunc

ok this is supposed to make a list of all the files in the c: dir but nothing happends except for the error recursion level overflowed???? why is that happening it's only supposed to recurse itself a couple of times at moast 20 i think :)


Only two things are infinite, the universe and human stupidity, and i'm not sure about the former -Alber EinsteinPractice makes perfect! but nobody's perfect so why practice at all?http://forum.ambrozie.ro

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Add some trace lines in there..

ConsoleWrite($path & @LF)

Or search for "Func dbg" and use that.

EDIT: Both requires a editor capturing ConsoleWrite. SciTE4Autoit3 (or scite in the scite subfolder of a resent installation) does.

Edited by Uten

Share this post


Link to post
Share on other sites

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

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