Answer Posted / yogesh
'CREATE FOLDER STRUCTURE
Option Explicit
Dim objFSO:Set objFSO = CreateObject
("Scripting.FileSystemObject")
Dim strDirectory:strDirectory=inputbox("Enter
path ","Create folder utility"," ")
'Declare variables
GeneratePath(strDirectory)
'Call to Function
Function GeneratePath(pFolderPath) ' Defination of function
GeneratePath = False
If Not objFSO.FolderExists(pFolderPath) Then
If GeneratePath(objFSO.GetParentFolderName(pFolderPath))
Then 'Recursive call to function
GeneratePath = True
Call objFSO.CreateFolder(pFolderPath)
End If
Else
GeneratePath = True
End If
End Function
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
What is a sequential access file?
Write a program to print factorial of given number without using recursion?
What are 3 types of structures?
how to print the character with maximum occurence and print that number of occurence too in a string given ?
program for reversing a selected line word by word when multiple lines are given without using strrev
How can you avoid including a header more than once?
What do you mean by command line argument?
What is main return c?
about c language
Whats s or c mean?
What is the difference between text files and binary files?
If errno contains a nonzero number, is there an error?
How many types of operator or there in c?
What are the 5 data types?
What is echo in c programming?