Since you've got objFSO anyway, why not use its and methods. Really, FileSystemObject has most of this figured out already, so spare yourself some pain; no need to reinvent the wheel.EDIT: Here's an example of what I think you want to do. Adapt as you see fit. StrFullPath = 'C:aaaaTestVbscript' ' 4 levels' How many levels are there?nLevel = 0strParentPath = strFullPathDo Until strParentPath = 'strParentPath = FSO.GetParentFolderName(strParentPath)nLevel = nLevel + 1LoopDebug.Print nLevel ' nLevel = 4 for this exampleFor iLevel = 1 To nLevel' Figure out path for directory at level iLevelstrParentPath = strFullPathFor j = 1 To nLevel - iLevelstrParentPath = FSO.GetParentFolderName(strParentPath)Next j' Does this directory exist? If not, create it.Debug.Print iLevel, strParentPath, FSO.FolderExists(strParentPath)If FSO.FolderExists(strParentPath) = False ThenSet newFolder = FSO.CreateFolder(strParentPath)End IfNext iLevel.
(15 responses) I have a scoring sheet that lists scores in a column but never know how many names will be entered and want to find the minimum score in a c.(10 responses) Good Afternoon All; I am running into an issue I can't resolve with a data export. The data exports with what I suppose would be called.(13 responses) I have a simple formula starting in column AD6-AQ6 in AD6 i have =aa06 AE6 =aa07 AF6 =aa08 ect it stops in cell AQ6 then drops down to AD7 o.(9 responses) Hi all, I have data that is always changing.
Feb 28, 2005 - Let's show you a script that checks for the existence of the. If objFSO.FolderExists(strPath) Then Wscript.Echo “The folder exists.” Else Wscript.
I need a macro that searches through column AH for the word 'Black'. If the word '.(10 responses) Would you know what would be the correct formula for converting year/month to correct date. Example: All rows display 2019/01, 2019/02, 2019.The Holy Grail of Excel Tips $12.60.