Module
Contents
Index 🔎︎

# MkDir Statement

Daatu tareessaancho aana haaro furcho kalaqanno.

## Ganallo:

    MkDir Borro Naanni-fikiimate Gede

## Eishshuwa:

Borro: kalaqantanno furchu su'manna haruma badanno naanni-fikiimate handaara. Hattono URL Qaagiishsha horonsi'rano dandaatto.

Harumu tiraminokkiro, furchu xaa furchi giddo kalaqamanno.

## Error codes:

5 Horiweelo aante woshsho

76 Harumu diafamino

## Lawishsha:

    Sub ExampleFileIO

    ' Faylete uurrinshsho assishshuwara lawishsha

    Const sFile1 As String = "file://c|/autoexec.bat"

    Const sDir1 As String = "file://c|/Temp"

    Const sSubDir1 Naannifikiimate gede ="Jifi"

    Const sFayle2 Naannifikiimate gede = "Hinkiilamino.tmp"

    Const sFayle3 Naannifikiimate gede = "Su'ma soorrantino.tmp"

    Dim sFile As String

        sFile = sDir1 + "/" + sSubDir1

        ChDir( sDir1 )

        Dir(sSubDir1,16)="" ikkiro ' Furchu hee'rannoni?

            MkDir sSubDir1

            MsgSaaxine sFayle,0,"Furcho kalaqi"

        End If

        sFile = sFile + "/" + sFile2

        FileCopy sFile1 , sFile

        MsgSaaxine fSysURL(CurDir()),0,"Xaa furcho"

        MsgBox sFayle & Chr(13) & FileDateTime( sFile ),0,"Kalaqote yanna"

        MsgBox sFile & Chr(13)& FileLen( sFile ),0,"Faylete seendille"

        MsgBox sFile & Chr(13)& GetAttr( sFile ),0,"Faylete sona"

        Name sFile As sDir1 + "/" + sSubDir1 + "/" + sFile3

        ' Adarricho furcho giddo su'ma soorri

        sFile = sDir1 + "/" + sSubDir1 + "/" + sFile3

        SetAttr( sFile, 0 ) 'baala sona huni

        MsgBox sFile & Chr(13) & GetAttr( sFile ),0,"Haaro faylete sona"

        Kill sFile

        RmDir sDir1 + "/" + sSubDir1

    End Sub

    ' URL giddo amuraatu haruma woleessanno

    Function fSysURL( fSysFp As String ) As String

    Dim iPos As String

        iPos = 1

        iPos = Instr(iPos,fSysFp, getPathSeparator())

        Do While iPos > 0

            Mid( fSysFp, iPos , 1,"/")

            iPos = Instr(iPos+1,fSysFp, getPathSeparator())

        Loop

        ' DOSnni ledote malaate

        iPos = Instr(1,fSysFp,":")

        If iPos > 0 Then Mid( fSysFp, iPos , 1,"|")

        fSysURL = "file://" & fSysFp

    End Function