Click to See Complete Forum and Search --> : Help with simple FileSystemObject?


TheIconoclast
03-10-2009, 11:10 PM
Hey guys, I've been playing around with ASP more these days and now that I've read about the FileSystemObject I'm trying to play around with it a bit.

What I want to do is to create a really simplistic page with 2 functions:

1) allow the user to create a new directory and name it
2) allow the user to create a new file and name it

I know what the attributes are of the FSO, but what would the code look like?

Also, how would go about outputting a directory file structure? I'm guessing I would need to use a loop and loop through all the folder and filenames?

Any help would be greatly appreciated! Thanks! :D

Kuriyama
03-11-2009, 09:07 AM
1) allow the user to create a new directory and name it.
Make a form that gives a relative path and folder name. . .http://www.w3schools.com/asp/met_createfolder.asp

2) allow the user to create a new file and name it.
This isn't as easy as you think. File creation is really stupid in VBScript. You can only create text files. There are a few file upload scripts running around out there, but if you want to write binary data(images, or anything useful) you are going to want to look at .NET. Remember, if you can use ASP classic then you have .NET installed and running on your webserver.

TheIconoclast
03-11-2009, 11:18 AM
Thanks for the link I will look that over...and I think to start I only want to allow the creation of text files, nothing complicated just yet.