neodammer Posted December 8, 2004 Posted December 8, 2004 (edited) ' Create a reference to the current directory. Dim di As New DirectoryInfo("http://mywebsite/") ' Create an array representing the files in the current directory. Dim fi As FileInfo() = di.GetFiles() Label1.Text = "The following files exist in the current directory:" ' Print out the names of the files in the current directory. Dim fiTemp As FileInfo For Each fiTemp In fi Label1.Text = Label1.Text & "" & fiTemp.Name Next fiTemp I get this error message "does not support URL" anybody know a method thats similar to this that would? Edited December 8, 2004 by neodammer Quote Enzin Research and Development
Administrators PlausiblyDamp Posted December 8, 2004 Administrators Posted December 8, 2004 Are you doing this within an ASP.Net application and require the path to the web application's folder? If so then Server.MapPath is probably what you are after. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
neodammer Posted December 8, 2004 Author Posted December 8, 2004 Not asp just a simple application for me on the roads to check up on things via internet. All I need to do now is see my directory. I set permissions on it so that im able to. Quote Enzin Research and Development
neodammer Posted December 18, 2004 Author Posted December 18, 2004 What im trying to do via application even possible without asp? I thought it was because all im doing is the exact same thing as the code above except via internet. I understand that most servers have settings preventing the viewing but the site im trying to view "my own" from out of town has permissions that allow for directory viewing. Quote Enzin Research and Development
*Experts* mutant Posted December 19, 2004 *Experts* Posted December 19, 2004 Im not sure if Im understanding you correctly but you cannot simply access a directory on another computer, even if it would allow for that. You need some kind of a software server running. And no, that class does not support URLs. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.