tempman Posted September 24, 2008 Share Posted September 24, 2008 Hi,To make things simpler, I adjust my script#include <File.au3> #Include <Array.au3> $DIR = (@MyDocumentsDir) DirCreate(@UserName) $SAVE_DIR = _PathFull(@UserName) $FILES = FileFindFirstFile($DIR & "\*.DOC") If $FILES = 0 Then Exit Else For $INDEX = 1 To $FILES[0] $SOURCE = $DIR & "\" & $FILES[$INDEX] If FileGetSize($SOURCE) < 50000 Then FileCopy($SOURCE,$SAVE_DIR) EndIf Next EndIfNow instead to search only @MyDocumentsDir, I nead to search through all files and folders in directory.It has to do withWhile 1FileFindNextFile()FileClose()But not for shure how... Link to comment Share on other sites More sharing options...
Prab Posted September 24, 2008 Share Posted September 24, 2008 To handle sub directories, you need to use recursion. Basically, A function can call itself with a different parameter. I made a program that does this, but might be a little overly complex. http://www.autoitscript.com/forum/index.ph...mp;#entry575261 Look at function Func search($searchHandle, $searchLocation). FolderLog GuiSpeech Assist Link to comment Share on other sites More sharing options...
tempman Posted September 24, 2008 Author Share Posted September 24, 2008 ... but might be a little overly complex...You are rigth for that, no nead for GUI in my sample script.I lost me there Link to comment Share on other sites More sharing options...
ksmith247 Posted September 24, 2008 Share Posted September 24, 2008 Check here Support bacteria; it's the only culture most people have.LxP's Learning to Script with AutoIt 3 - Excellent starting placeVolly's Links Page - Links to cool and useful scriptsAutoIt Wrappers - Valuater's AutoIt Wrappers post. Lots of good stuff.Support AutoIt - Make a donation here; I did.[size="2"]#include <Guinness.pint>[/size] Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now