Reply
FileSystemObject
Old 03-12-2008, 05:14 PM FileSystemObject
Skilled Talker

Posts: 77
It says permission denied when I try to run it.

http://balloonfightforever.bit-digit...lereadtest.asp

heres the code
Code:
<%
dim fs,fo,x
set fs=Server.CreateObject("Scripting.FileSystemObject")
set fo=fs.GetFolder("tests\")

for each x in fo.files
  Response.write(x.Name & "<br />")
next

set fo=nothing
set fs=nothing
%>
Any idea why it doesn't work?
Skeddles is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
     
Old 03-12-2008, 09:28 PM Re: FileSystemObject
ForrestCroce's Avatar
Half Man, Half Amazing

Posts: 3,025
Name: Forrest Croce
Location: Seattle, WA
Either you don't have ntfs permission, or the folder doesn't exist in the current working path for IIS and your web site.
ForrestCroce is offline
Reply With Quote
View Public Profile Visit ForrestCroce's homepage!
 
Old 03-13-2008, 04:15 PM Re: FileSystemObject
chrishirst's Avatar
Super Moderator

Posts: 11,914
Location: Blackpool. UK
GetFolder needs a physical folder path

set fo=fs.GetFolder(server.mappath("tests"))
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Indifference will be the downfall of mankind, but who cares?
Code Samples | People Counting System
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 03-15-2008, 12:16 AM Re: FileSystemObject
Skilled Talker

Posts: 77
Quote:
Originally Posted by chrishirst View Post
GetFolder needs a physical folder path

set fo=fs.GetFolder(server.mappath("tests"))
Thank you sooooo much, it worked.

I'm making a video game fansite, and theres a fanart section, and I wanted to display art without using a database.
Skeddles is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to FileSystemObject
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.12359 seconds with 13 queries