Ok find below the code I have to date. I get an error message- activex can't create object... I think it won't let me create this object on the client side, but because I'm onl running on an intranet it can be on client side or server side- it's the same bunch of folders. Maybe I need to access the server and create the filesystemobject here. Any ideas anyone?! Thankyou!
<SCRIPT language=vbscript event=onclick for=btAttach>
<!--
' a = the filename value
dim fso
dim a, fldr, filenme
dim rs
a = FormAttach.inputAttach.value
'if no folder with ampno then create one in default directory
cmd = "SELECT * FROM [tblOptions]"
set rs = MSODSC.Connection.Execute (cmd)
rs.movefirst
fldr = rs.fields("InstallPath") & "AttachedFiles\" & cstr(txtampid.value ) & "\"
msgbox "1"
Set fso = CreateObject("Scripting.FileSystemObject")
msgbox "2"
If (fso.FolderExists(fldr)) Then
Else
Set fso1 = CreateObject("Scripting.FileSystemObject")
msgbox fldr
fso1.CreateFolder(fldr)
End If
'get file name of the file that has been passed
filenme = GetFileNameOnly(a)
'if fso.fileexists(
-->
</SCRIPT>