I'm having trouble using the following VbScript (example straight from MS VbScript site):
Set fso = CreateObject("Scripting.FileSystemObject"
Set MyFile = fspenTextFile("c:\upload\testfile.txt", ForWriting, True)
MyFile.WriteLine "Hello world!"
MyFile.WriteLine "The quick brown fox"
MyFile.Close
Set MyFile = fspenTextFile("c:\upload\testfile.txt", ForReading)
ReadLineTextFile = MyFile.ReadLine ' Returns "Hello world!"
MyFile.Close
I'm getting an "invalid procedure call or argument" error on the fspenTextFile line. Permissions on c:\upload on the web server are set to "Full" for everyone (for testing). The Persits AspUpload component has no trouble uploading files to c:\upload. Actually, I'm trying to read the uploaded files, but since I ran into the problem, I tried the above code to see if it worked. It doesn't matter whether I try to open a TextStream object for read or write, I get the same error.
Any clues?
[sig][/sig]
Set fso = CreateObject("Scripting.FileSystemObject"
Set MyFile = fspenTextFile("c:\upload\testfile.txt", ForWriting, True)
MyFile.WriteLine "Hello world!"
MyFile.WriteLine "The quick brown fox"
MyFile.Close
Set MyFile = fspenTextFile("c:\upload\testfile.txt", ForReading)
ReadLineTextFile = MyFile.ReadLine ' Returns "Hello world!"
MyFile.Close
I'm getting an "invalid procedure call or argument" error on the fspenTextFile line. Permissions on c:\upload on the web server are set to "Full" for everyone (for testing). The Persits AspUpload component has no trouble uploading files to c:\upload. Actually, I'm trying to read the uploaded files, but since I ran into the problem, I tried the above code to see if it worked. It doesn't matter whether I try to open a TextStream object for read or write, I get the same error.
Any clues?
[sig][/sig]