











CompTIA
Exam Vouchers
Save money on CompTIA exams
| Question of the day
Sign up to receive
interactive practice questions
for MCSE, CompTIA
Cisco and other exams
| TestKing
Get MCSE, MCSD, CCNA, CCNP,A+, N+ and many more | * ExamSheets *
Guide for Success!
Actual Questions & Answers
MCSE, MCSD, A+ ,CCNA, CCNP
Oracle 8i, Oracle 9i Online practice tests
Certification sites Online university Online college Online education Distance learning Software forum Server administration forum Programming resources
|
|  |
| Author |
filesystemobject plzzz help!? :)
|
ddd
REXQME!!!

Registered: Jun 2001 Location: Country: Australia State: Certifications: MCP's, CIWA, CIWP, MCIWD, CIWCI Working on: MCIWED, MCSD, XML,
Total Posts: 199
|
|
filesystemobject plzzz help!? :)
can I use the FSO to access files in a directory that hasn't got HTTP access but resides on the web server? I was thinking that I would be able to write a script to use the FSO if a user had permissions to download files.
is this possible? if so, how?
would realllllyyyy appreciate ur help 
Report this post to a moderator
|
|
12-01-01 02:26 AM
|
|
focused
Junior Member
Registered: Nov 2001 Location: Country: United Kingdom State: Certifications: MCSD Working on:
Total Posts: 3
|
|
filesystem object
yes it's possible to access files in a folder on the server without http: ref.
First, you'll need to know the path to the file (On the web server itself)
Try this,
'OPEN ACCESS TO THE FILE SYSTEM
Set objFSO=Server.CreateObject("Scripting.FileSystemObject")
Foldername = WebLoc & ToolFileLoc & "Info And Resources"
foldername=Path to the folder where the files will be placed e.g On the server- \\severname\driveletter\folder
\
If objFSO.FolderExists(Foldername) Then
flgFolderExists = True
Set objFolders=objFSO.GetFolder(Foldername)
strFolderName="Info And Resources"
Else
Response.Write("The folder " & Foldername & " does not exist")
flgFolderExists = False
End If
Then in the body or a sub
If flgFolderExists = True Then
If objFolders<>"" Then
For Each objFiles In objFolders.Files
<a href="<%=Webserver file syntax - eg http:www.//testserver/%><%=strFoldername%>/<%=objFiles.Name%>"><%=objFiles.Name%></a>
And anything you want
Next
Else
Response.Write("<font class=AlertText> Sorry, No information exists at this time.</font>")
End If
Else
Response.Write("<font class=alerttext>Sorry, This folder is not available at this time.</font>")
End If
I hope this helps in any way. If it doesn't sorry for wasting your time
Report this post to a moderator
|
|
12-03-01 04:45 PM
|
|
|
Click here for list of MCSD
study guides and order yours now!
Forum Rules: Who Can Read The Forum? Any registered user or guest.
Who Can Post New Topics? Any registered user.
Who Can Post Replies? Any registered user.
Changes: Messages can be edited by their author.
Posts: HTML code is OFF. Smilies are ON. vB code is ON. [IMG] code is ON. |
|
ExamNotes forum archive
|