VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



User can create as many folders and subfolders as he/she wants.

by Iratxe Bajo Urcelay (3 Submissions)
Category: Files/File Controls/Input/Output
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Tue 22nd April 2003
Date Added: Mon 8th February 2021
Rating: (1 Votes)

User can create as many folders and subfolders as he/she wants.

API Declarations


Dim pos As Integer
Dim sDirectory As String
Dim sSlash As Integer


Rate User can create as many folders and subfolders as he/she wants.



    txtPath.text = LCase(txtPath.text)
    txtPath.text = Replace(txtPath.text, "/", "\")
    If Right$(txtPath.text, 1) <> "\" Then
        txtPath.text = txtPath.text & "\"
    End If
    pos = 0
    sSlash = 4    
    Do Until pos > iSize
        pos = InStr(sSlash, txtPath.text, "\")
        If pos = 0 Then
            Exit Do
        Else
            sDirectory = Left$(txtPath.text, pos)
            If Dir$(sDirectory, vbDirectory) <> "." Then              
                MkDir sDirectory
            End If
        End If
        sSlash = pos + 1
    Loop

Download this snippet    Add to My Saved Code

User can create as many folders and subfolders as he/she wants. Comments

No comments have been posted about User can create as many folders and subfolders as he/she wants.. Why not be the first to post a comment about User can create as many folders and subfolders as he/she wants..

Post your comment

Subject:
Message:
0/1000 characters