Module
Contents
Index 🔎︎

# Dir Function

Maqaa faayilii ,galeeloo ykn faayilii fi galeeloo hunda oofaa ykn galeeloo kan xurree barbaachisaa waliin wal gitu deebisi.

## caasimaa:

    Dir [(Text As String) [, Attrib As Integer]]

## Gatii deebii:

Diraa

## Ulaagaalee:

Barruu:Himamsa itergaa kamiyyuu kan xurree barabaachisaa,galeeloo fi faayilii. Qajeelfamni kun kan ibsamu yommu ati faankishinii Dir waamtu. yoo barbaadde, xurree sirnasxaa URL haala kanaan galchuu dandeessa.

Attrib: Himamsa itergaa kamiyyuu kan faayilii laklamee ibsu. Faankishiniin Dir jedhamu faayiliin ykn galeeloon amaloota ibsaman waliin wal madaalu deebisa. Amaloota hedduu gatii amalootaa ida'uun walitti makuu dandeessa.

0: Faayilii baratamoo.

16 : Maqaa galeeloo qofa deebisi.

Akka faayiliin ykn galeeloon jiru mirkaneessuu yoo barbaadde amaloota faayyadami ykn faayilii fi ukaankaa hunda galeeloo keessatti murteessi.

Jiraachuu faayiliin mirkaneessuuf,xurree fi maqaa faayilii guutuu galchi. Yoo maqaan faayilii ykn galeeloon jiraachuu baate ,faankishiniin Dir dheerina diraa duwwaa (" ") deebisa.

To generate a list of all existing files in a specific directory, proceed as follows: The first time you call the Dir function, specify the complete search path for the files, for example, "D:\Files\*.ods". If the path is correct and the search finds at least one file, the Dir function returns the name of the first file that matches the search path. To return additional file names that match the path, call Dir again, but with no arguments.

To return directories only, use the attribute parameter. The same applies if you want to determine the name of a volume (for example, a hard drive partition).

## Error codes:

5 Ejjatoo fashalaan waamu

53 Faayilii hin argamne 53 Faayilii hin argamne 53 Faayilii hin argamne 53 Faayilii hin argamne 53 Faayilii hin argamne 53 Faayilii hin argamne

## Fakkeenya:

    Sub ExampleDir

    REM  Faayiloota fi galeeloota hunda agarsiisi.

    Dim sPath As String

    Dim sDir As String, sValue As String

        sDir="Directories:"

        sPath = CurDir

        sValue = Dir$(sPath + getPathSeparator + "*",16)

        Do

            If sValue <> "." And sValue <> ".." Then

                If (GetAttr( sPath + getPathSeparator + sValue) And 16) >0 Then

                    REM Galeeloota argadhu

                    sDir = sDir & chr(13) & sValue

                End If

            End If

            sValue = Dir$

        Loop Until sValue = ""

        MsgBox sDir,0,sPath

    End Sub