Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


Creating folders using asp/fso on pws

Posted on 2003-02-20
Medium Priority
Last Modified: 2013-12-25
I tried to dynamically create a folder on my home workstation using the code below. Not only does it not create the folder, but it seems to sit in a loop. I do have the scrrun.dll on my machine which is what Microsoft says contains the fso. I also tried this same code at work (IIS 5.0 Server) and it worked fine. Why not a home??

Set fso = CreateObject("Scripting.FileSystemObject")
folder = Server.mapPath("/albums/images/newFolder")
if  not fso.FolderExists(folder) then
end if
Set fso = Nothing

Thank you

Question by:gutierrez13
LVL 18

Accepted Solution

mgfranz earned 192 total points
ID: 8031080
"sits in a loop"?  how do you know?  Does the folder get created?  I'm sure there is more to your script than this... You said PWS is the driving motor behind the script?

Post your code.  And try this;

Set fso = Server.CreateObject("Scripting.FileSystemObject")

Update to ASP 3.0 too.
LVL 10

Assisted Solution

dij8 earned 188 total points
ID: 8148764
You will need permissions to create files or folders.  If you are on an NT based machine then this will have to be set.  You need to give write permissions to the IUSR_ComputerName account and/or IWAM_ComputerName.  These are the Internet accounts.  Assuming the "albums" folder already exists then this is the folder that will need to have the permissions applied to.

I am assuming that you are running the page through a server on your machine.  You will NOT be able to create folders on the client machine when the server is a different one.

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Although a lot of people devote their energy toward marketing for specific industries, there are some basic principles that can be applied to any sector imaginable. We’ll look at four steps to take and examine how those steps were put into action fo…
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.
Suggested Courses
Course of the Month15 days, 13 hours left to enroll

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question