I'm not very good with writing code from scratch
I have written the below code but can't get it to work - what am I doing
wrong or is it just not possible to do.
The .bat file just copies some folders from one place to another.
Any help would be appreciated
Here is the code:
Sub ClientFolder()
' NewClient Folder Creation
Dim MyFilePath
MyFilePath = InputBox("Please Type the Alphabetical Letter you wish to
create your New Client Folder in:")
If MyFilePath = "A" Then
dRetVal = Shell("w:\data\_clients\A\_New Client.bat", Mode)
ElseIf MyFilePath = "b" Then
dRetVal = Shell("w:\data\_clients\B\_New Client.bat", Mode)
End If
End Sub
Kevin B - 10 Jan 2006 14:57 GMT
Rather than shell out you can user the copyfolder method.
In the example below o is delcared as an object and assigned a file system
object value. The next line copies from the source folder to the target
folder.
Sub CopyFolder()
Dim o As Object
Set o = CreateObject("Scripting.FileSystemObject")
o.CopyFolder "C:\Test1", "C:\Test2"
Set o = Nothing
End Sub

Signature
Kevin Backmann
> I'm not very good with writing code from scratch
>
[quoted text clipped - 19 lines]
> End If
> End Sub