Sign in to follow this  
Followers 0
PantZ4

How to search after a .doc type file in a folder?

5 posts in this topic

#1 ·  Posted (edited)

$search = FileFindFirstFile("J:\Dokumenter\"&"*.doc")

As you maybe can see I wanna to search for .doc files only in J:\Dokumenter. But it wont work :whistle:.

How do I do that?

Thank you ;)

Edited by Mr. Zero

Share this post


Link to post
Share on other sites



see

_FileListTo Array()

in help

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

see

_FileListTo Array()

in help

8)

How?

I have tryed, follow the help file,:

#Include <File.au3>
#Include <Array.au3>
$FileList=_FileListToArray("J:\Dokumenter\","*.doc")
If (Not IsArray($FileList)) and (@Error=1) Then
    MsgBox (0,"","No Files\Folders Found.")
    Exit
EndIf
_ArrayDisplay($FileList,"$FileList")

And the help file says;

lists files and\or folders in a specified path (Similar to using Dir with the /B Switch)

#include <File.au3>

_FileListToArray($sPath [, $sFilter [, $iFlag]])

Parameters

$sPath Path to generate filelist for.

$sFilter Optional the filter to use, default is *. Search the Autoit3 helpfile for the word "WildCards" For details.

$iFlag Optional: specifies wheather to return files folders or both

$iFlag=0(Default) Return both files and folders

$iFlag=1 Return files only

$iFlag=2 Return Folders only

Thanks :whistle:

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