Dir Function

ཡིག་སྣོད་ཀྱི་མིང་དེ་ སྣོད་ཐོ་ ཡང་ན་ཡིག་སྣོད་ཚུ་ཆ་མཉམ་དང་དྲན་འཕྲུལ་གུ་གི་སྣོད་ཐོ་ཚུ་ཡང་ན་སྣོད་ཐོ་གསལ་བཀོད་འབད་ཡོད་པའི་འཚོལ་ཞིབ་འགྲུལ་ལམ་མཐུན་སྒྲིག་འབད་མི་དེ་སླར་ལོགཔ་ཨིན།

Syntax:


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

གནས་གོང་སླར་ལོག:

ཡིག་རྒྱུན།

Parameters:

ཚིག་ཡིག་: ཡིག་རྒྱུན་གསལ་བརྗོད་གང་རུང་དེ་གིས་འཚོལ་ཞིབ་འགྲུལ་ལམ་ སྣོད་ཐོ་ཡང་ན་ཡིག་སྣོད་དེ་གསལ་བཀོད་འབདཝ་ཨིན། འ་ནི་སྒྲུབ་རྟགས་དེ་ཁྱོད་ཀྱིས་ཌི་ཨའི་ཨར་ལས་འགན་བོད་ནི་དང་པ་རྐྱངམ་ཅིག་གསལ་བཀོད་འབདཝ་ཨིན། ཁྱོད་ཀྱིས་ ཡུ་ཨར་ཨེལ་དབྱངས་རྟགས་ནང་འགྲུལ་ལམ་བཙུགས་བཏུབ།

ཁྱད་ཆོས་: ཧྲིལ་ཨང་གསལ་བརྗོད་གང་རུང་དེ་ཡིག་སྣོད་ཁྱད་ཆོས་ཚུ་བིཊི་དང་འཁྲིལ་གསལ་བཀོད་འབདཝ་ཨིན། ཌི་ཨའི་ཨར་་ལས་འགན་གྱིས་རྐྱངམ་ཅིག་ཡིག་སྣོད་ཚུ་ཡང་ན་ སྣོད་ཐོ་གསལ་བཀོད་འབད་ཡོད་མི་ཁྱད་ཆོས་ཚུ་དང་མཐུན་སྒྲིག་འབད་མི་དེ་སླར་ལོགཔ་ཨིན། ཁྱོད་ཀྱིས་ཁྱད་ཆོས་གནས་གོང་ཚུ་ཁ་སྐོང་འབད་དེ་གིས་སྦེ་ཁྱད་ཆོས་ཚུ་ལེ་ཤ་ར་མཉམ་མཐུད་འབད་བཏུབ་ཨིན:

༠ : སྤྱིར་བཏང་ཡིག་སྣོད་ཚུ།

16 : སྣོད་ཐོ་རྐྱངམ་ཅིག་གི་མིང་སླར་ལོགཔ་ཨིན།

འ་ནི་ཁྱད་ཆོས་དེ་ཡིག་སྣོད་ཡང་ན་སྣོད་ཐོ་ཡོདཔ་ཚུ་ཞིབ་དཔྱད་འབད་ནི་ལུ་ལག་ལེན་འཐབ་ ཡང་ན་ཡིག་སྣོད་ཚུ་ཆ་མཉམ་དང་སྣོད་ཐོ་གསལ་བཀོད་ནང་སྣོད་འཛིན་ཚུ་གཏན་འབེབས་བཟོ་ནི་ལག་ལེན་འཐབ།

ཡིག་སྣོད་གཅིག་ཡོད་པ་ཨིན་ཞིབ་དཔྱད་འབད་ནི་ལུ་ ཡོངས་སྒྲུབ་འགྲུལ་ལམ་དང་ཡིག་སྣོད་ཀྱི་མིང་དེ་བཙུགས། ཡིག་སྣོད་ཡང་ན་སྣོད་ཐོ་མིང་དེ་མེད་པ་ཅིན་ ཌི་ཨའི་ཨར་ལས་འགན་དེ་ ("")ཡིག་རྒྱུན་རིང་ཚད་ཀླད་ཀོར་སླར་ལོགཔ་ཨིན།

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:

༥ ནུས་མེད་བྱ་སྒོའི་ལམ་ལུགས་བོད་བརྡ་

༥༣་ ཡིག་སྣོད་འཚོལ་མ་ཐོབ་ ༥༣་ ཡིག་སྣོད་འཚོལ་མ་ཐོབ་ ༥༣་ ཡིག་སྣོད་འཚོལ་མ་ཐོབ་ ༥༣་ ཡིག་སྣོད་འཚོལ་མ་ཐོབ་ ༥༣་ ཡིག་སྣོད་འཚོལ་མ་ཐོབ་ ༥༣་ ཡིག་སྣོད་འཚོལ་མ་ཐོབ་

Example:


Sub ExampleDir
རིམ་གྱིས་ཡིག་སྣོད་ཚུ་དང་སྣོད་ཐོ་ཚུ་ཆ་མཉམ་བཀྲམ་བཏོན་འབདཝ་ཨིན།
Dim sPath As String
Dim sDir As String, sValue As String
    ཨེསི་ཌར="Directories:"
    sPath = CurDir
    sValue = Dir$(sPath + getPathSeparator + "*",16)
    Do
        If sValue <> "." And sValue <> ".." Then
            If (GetAttr( sPath + getPathSeparator + sValue) And 16) >0 Then
                ཨར་ཨི་ཨེམ་་ལེན་སྣོད་ཐོ་འདི་ཚུ།
                sDir = sDir & chr(13) & sValue
            End If
        End If
        sValue = Dir$
    Loop Until sValue = ""
    MsgBox sDir,0,sPath
End Sub

Please support us!