04-09-2012 12:20 PM
I am using SLX (LAN). I need to create a new windows folder (directory) any time a new "Opportunity" is created. For instance, if I'm creating a new Opportunity named '1234abcd' in SLX, externally I want to create E:\Opportunity\1234abcd. Can anyone get me started in the right direction?
04-09-2012 01:09 PM
You could use the FileSystemObject to create folders programatically within VB Script.
You can find some additional info on the MSDN (or google it):
http://msdn.microsoft.com/en-us/library/d6dw7aeh(v=vs.85).aspx
04-09-2012 01:58 PM
Here's a function that I use.. both in LAN" and in TaskCentre:
Function FSO_Mkdir(ByVal sPath)
Dim objFSO
Dim boolErr
Dim strErrDesc
boolErr =False
FSO_Mkdir = True
On Error Resume Next
Set objFSO =CreateObject("Scripting.FileSystemObject")
objFSO.CreateFolder sPath
If Err Then
boolErr =True
strErrDesc =Err.Description
EndIf
Set objFSO =Nothing
On Error GoTo 0
If boolErr Then
'Err.Raise 5101, "MkDir Statement", strErrDesc
FSO_Mkdir = False
End If
End Function