Extremely new at vbscript.
I found this code to create a static folder......
MsgBox "Folder created:" & CreateFolder("C:\123\test"
Function CreateFolder(folderName)
On Error Resume Next
Dim aFolders: aFolders = Split(folderName,"\"
Dim i
Dim currentFolder
Dim oFSO: Set oFSO = WScript.CreateObject("Scripting.FileSystemObject"
For i = LBound(aFolders) to UBound(aFolders)
currentFolder = currentFolder & aFolders(i) & "\"
If NOT oFSO.FolderExists(currentFolder) Then
oFSO.CreateFolder(currentFolder)
End If
Next 'i
If oFSO.FolderExists(folderName) Then
CreateFolder = True
Else
CreateFolder = False
End If
End Function
Question: How can I take the results of an InputBox and create, for example, "c:\123\INPUTBOX RESULT"
Thanks in advance,
Anthony
I found this code to create a static folder......
MsgBox "Folder created:" & CreateFolder("C:\123\test"
Function CreateFolder(folderName)
On Error Resume Next
Dim aFolders: aFolders = Split(folderName,"\"
Dim i
Dim currentFolder
Dim oFSO: Set oFSO = WScript.CreateObject("Scripting.FileSystemObject"
For i = LBound(aFolders) to UBound(aFolders)
currentFolder = currentFolder & aFolders(i) & "\"
If NOT oFSO.FolderExists(currentFolder) Then
oFSO.CreateFolder(currentFolder)
End If
Next 'i
If oFSO.FolderExists(folderName) Then
CreateFolder = True
Else
CreateFolder = False
End If
End Function
Question: How can I take the results of an InputBox and create, for example, "c:\123\INPUTBOX RESULT"
Thanks in advance,
Anthony