I have a problem with CreateTextFile in that whenever I try to use a variable in the filename I get the error "bad filename or number".
The code I'm using is
outputfile = "//192.168.10.152/encoded/" & filenumber & ".enc"
Set objfso = Server.CreateObject("Scripting.FileSystemObject").CreateTextFile(outputfile,True)
If I replace "filenumber" with a literal string i.e outputfile = "//192.168.10.152/encoded/testfile.enc" it creates the file without problem, but as I need to use a variable name for the filename,does anyone have any ideas/pointers to resolve this.
The code I'm using is
outputfile = "//192.168.10.152/encoded/" & filenumber & ".enc"
Set objfso = Server.CreateObject("Scripting.FileSystemObject").CreateTextFile(outputfile,True)
If I replace "filenumber" with a literal string i.e outputfile = "//192.168.10.152/encoded/testfile.enc" it creates the file without problem, but as I need to use a variable name for the filename,does anyone have any ideas/pointers to resolve this.