I have the following:
dim fso
Dim newfolder
Dim strFolder
strFolder = "..\images\TAS\TAS_PayrollFiles\" & CCNum & ""
set fso=CreateObject("Scripting.FileSystemObject"
If Not filesys.FolderExists(strFolder) Then
Set newfolder = filesys.CreateFolder(strFolder)
Response.Write("A new folder has been created at: " & strFileNameRelative)
End If
' create a file system object
Dim strFileNameRelative
'set fso = server.CreateObject("scripting.FileSystemObject"
strFileNameRelative = "..\images\TAS\TAS_PayrollFiles\" & CCNum & "\PC_" & CCNum & "_" & FormatSysDate & ".xls"
strFileName = server.MapPath(strFileNameRelative)
Set act = fso.CreateTextFile (strFileName, True)
I wanted to know what is wrong with this statement?
I want basically to create a folder if it is created already then just go on and create the file inside the new folder. IF the folder is not created then create the folder and then the file.
Thanks
dim fso
Dim newfolder
Dim strFolder
strFolder = "..\images\TAS\TAS_PayrollFiles\" & CCNum & ""
set fso=CreateObject("Scripting.FileSystemObject"
If Not filesys.FolderExists(strFolder) Then
Set newfolder = filesys.CreateFolder(strFolder)
Response.Write("A new folder has been created at: " & strFileNameRelative)
End If
' create a file system object
Dim strFileNameRelative
'set fso = server.CreateObject("scripting.FileSystemObject"
strFileNameRelative = "..\images\TAS\TAS_PayrollFiles\" & CCNum & "\PC_" & CCNum & "_" & FormatSysDate & ".xls"
strFileName = server.MapPath(strFileNameRelative)
Set act = fso.CreateTextFile (strFileName, True)
I wanted to know what is wrong with this statement?
I want basically to create a folder if it is created already then just go on and create the file inside the new folder. IF the folder is not created then create the folder and then the file.
Thanks