Jump to content

Search through all files and folders in directory


tempman
 Share

Recommended Posts

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
EndIf

Now instead to search only @MyDocumentsDir, I nead to search through all files and folders in directory.

It has to do with

While 1

FileFindNextFile()

FileClose()

But not for shure how...

Link to comment
Share on other sites

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

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...