PDA

Click to See Complete Forum and Search --> : Fso


schnarf283
Mar 21st, 2001, 07:09 AM
I am using the file system object's CreateTextFile method to create a text file. Everything goes fine in the script, it displays the message it should saying the file was created, but it isn't. Do I need to specify the path like "http://www.myserver.com/folder/filename" or the path on the server itself, like "C:\webpagedir\folder\filename"? Are there any permissions that need to be set?

Mar 21st, 2001, 07:40 AM
You can use Server.MapPath to specify the path for your file.

nybble
Mar 21st, 2001, 04:49 PM
in further detail:

Server.MapPath("foldername/filename.txt")


and if you are already in the folder... for instance www.yoursite.com/foldername/
you would only need to do this:

Server.MapPath("filename.txt")

schnarf283
Mar 21st, 2001, 05:14 PM
What if the file doesn't yet exist?

nybble
Mar 22nd, 2001, 10:46 AM
it should still work.