document.write('<div class="c" style="font-family: monospace;"><br />');
document.write('<span style="color: #000000; font-weight: bold;">Function</span> MD<span style="color: #66cc66;">&#40;</span>strDirName<span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp;Dim lFSObj, lFolder<br />');
document.write('&nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">\' First See if it already exists<br />');
document.write('&nbsp; &nbsp; &nbsp;set lFSObj = Wscript.CreateObject(&quot;Scripting.FileSystemObject&quot;)<br />');
document.write('&nbsp; &nbsp; &nbsp;set lFolder = lFSObj.GetFolder(strDirName)<br />');
document.write('&nbsp; &nbsp; &nbsp;If Err.number = 0 then<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; \'</span> Yes, it does exist so we don<span style="color: #ff0000;">\'t have to do anything<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; MD = True<br />');
document.write('&nbsp; &nbsp; &nbsp;Else<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; Err.Clear<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; lFSObj.CreateFolder(strDirName)<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; If Err.Number &lt;&gt; 0 Then<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MD = False<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; Else<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MD = True<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; End If<br />');
document.write('&nbsp; &nbsp; &nbsp;End If<br />');
document.write('&nbsp; &nbsp; &nbsp;Set lFolder = Nothing<br />');
document.write('&nbsp; &nbsp; &nbsp;Set lFSObj = Nothing<br />');
document.write('End Function<br />');
document.write('<br />');
document.write('&nbsp;</span></div>');
document.write('<br />&nbsp;<br /><div style="font-size: 12px">Brought to you by the community at <a href="http://www.bytemycode.com/snippets/snippet/146/1/" target="_blank">byteMyCode</a>.</div>');
