close

Privacy guaranteed - Your email is not shared with anyone.

FTPing Question

Discussion in 'Tech Talk' started by Packin' Heat, Feb 7, 2005.

  1. Packin' Heat

    Packin' Heat

    Messages:
    1,356
    Likes Received:
    0
    Joined:
    Jan 17, 2001
    Location:
    Atlanta, GA
    So comcast is my provider and they give something like 10 megs to have my own webpage. I’ve made it an FTP site or server or whatever the proper name it. I FTP files up to it so I can access them whenever. My problem is there is no main page that has an index or directory, so unless I happen to know the EXACT path to whatever file I want, I can’t get to them.

    From home, using FTP Explorer (which is the app I use to upload with) I can get the path and then finally get to my stuff. Other than that, my files are hostage to the system.

    Anybody know how to fix it, get around it, or otherwise can recommend a better way to do this?
     
  2. fastvfr

    fastvfr Ancient Tech

    Messages:
    2,344
    Likes Received:
    0
    Joined:
    Mar 28, 2001
    Location:
    SW Oregon
    It depends on how the ISP has it set up...most of them seem to keep it simple, where it's www.myisp.com/yourusername as the URL to the web page space.

    If it is on a different type of setup where the FTP server is hidden by several layers of security, then there may be issues with the way you sent the files up originally.

    What most folks do is e-mail themselves a copy of the URLs. If you send it to a Yahoo account, it can be used from anywhere on the Web.

    So my guess would be that it is www.myisp.com/yourusername/file #1, www.myisp.com/yourusername/file#2 and so on, correct?

    There should be a Parent Index available from your browser if you have the page set up correctly, though, as I said, if your ISP has security cranked down, the only thing you might see is "Page Under Construction" or something like that...

    Your best bet is probably just to ask them. Maybe there is a FAQ somewhere, or a setting you must change to allow you to view the tree with your FTP app.
     

  3. Specks

    Specks

    Messages:
    267
    Likes Received:
    0
    Joined:
    Feb 21, 2001
    Location:
    Virginia
    The configuration of the web server may be the cause. By default, if the directory has an index.html file, that is the file that will be displayed in the browser. If the index.html file does not exist, the web server can be configured to show a directory listing or not. It sounds as if your isp has it configured to not show the directory listing. Talk to your isp to confirm. If this is the case, then create an index.html file and have links to the files you've uploaded.
     
  4. SKeefe

    SKeefe

    Messages:
    869
    Likes Received:
    0
    Joined:
    Mar 11, 2003
    Location:
    SC
  5. grantglock

    grantglock /dev/null

    Messages:
    219
    Likes Received:
    0
    Joined:
    Feb 20, 2004
    Location:
    Iowa
    see if there is a file called index.html and it is empty. If so delete it. otherwise its in the isp's httpd.conf

    its called directoryindex, they have it disabled.
     
  6. Packin' Heat

    Packin' Heat

    Messages:
    1,356
    Likes Received:
    0
    Joined:
    Jan 17, 2001
    Location:
    Atlanta, GA
    That does work but I have to have an index.html in place. If not, it yells at me.

    That does work too but gets annoying when dealing with large numbers of files as you can imagine.

    that’s exactly what happens. I am messing around with building a web site with links to all my picts and whatever, but that too is a process that kinda sucks. I'll try to see what I can dig up, but my brief search into this a long time ago yielded no result. Sigh. Thanks for the help guys.
     
  7. N2DFire

    N2DFire Who Me ???

    Messages:
    149
    Likes Received:
    0
    Joined:
    Apr 29, 2003
    Location:
    Ferrum, VA
    Although I highly doubt this will work since they are not allowing directory browsing, but copy the following code into a notepad file & name it something .asp (i.e. browser.asp)

    Add this file to your directory & link it from your index.html page. It dynamicly creates links to files & sub folders of what ever folder it's in.

    PHP:
    <%
    ' newpath will be the directory name passed in the URL when we
    link to another directory

    newpath 
    request.querystring("newpath")

    ' test to see if folderspec set in Parent File
    if not then set to top level by default
    if 
    folderspec "" then
        folderspec 
    "..\"
        response.write "
    dir2list errorNo default value for folderspec given in parent file."
        response.write  "
    Top level used by default.<br>"
    end if

    ' we want to add a forward slash to the new path if the
    ' value of newpath isn't a zero-length string
    if  newpath<>"" then 
        folderspec = folderspec & newpath & "
    /"
    end if

    ' now we will create our filesystem object
    Set fs = CreateObject("
    Scripting.FileSystemObject")

    ' now we will define the folder and subfolders
    Set folder = fs.GetFolder(server.mappath(folderspec))
    Set subfolder = folder.subfolders

    ' let's return some HTML code here
    response.write "
    <h2>FOLDERS</h2>"

    ' Now we've got to take the path represented by the variable
    ' newpath and trim off the last subdirectory so we can use that
    ' as a link to the directory above it. We will do that first
    ' checking if there is, indeed, a value for newpath, and if there
    ' is, we will search for a forward slash in the string, starting
    ' from the end of the string, and use that position as a pointer
    ' so we know how many characters to peel off of the string "
    newpath".
    ' Since the pointer is at the position of the forward slash and we
    ' don't want the forward slash to remain, we'll subtract 1 from it.
    If newpath<>"" then
        Pointer = instrrev(newpath,"
    /")

    ' if the forward slash is found, we'll create the link to the
    ' directory above the current one. 
        If Pointer>0 then
            UpOneLevel = Left(newpath,Pointer-1)
            response.write "
    <a href='" & request.servervariables("script_name")
            response.write "?newpath=" & UpOneLevel & "'
    >Up One Level</a><hr width 150 alignleft>"

    ' Now let's make provisions where the forward slash isn't found
        Else
            response.write "
    <a href='" & request.servervariables("script_name")
            response.write "'
    >Up One Level</a><hr width 150 alignleft>"
        End If
    End If

    ' Now we can go through and add links to all the subfolders
    For Each newfolder in subfolder
        response.write "
    <A HREF='"
        response.write request.servervariables("script_name")

    This is where I ran into problems...if newpath isn't a zero-length
    stringwe won't want to add a forward slash, but we do want to add
    it if the value of newpath isn't a zero-length string
        If newpath="" then
            response.write "?newpath=" & newpath & newfolder.name
        Else
            response.write "?newpath=" & newpath & "/" & newfolder.name
        End If
        response.write "'
    >"
        response.write "
    <B>" & newfolder.name & "</B>"
        response.write "
    </A><br>"
    Next

    ' Ok, time to go grab those files in the current directory
    ' First we'll do a bit of HTML
    response.write "
    </blockquote>" '<hr>
    response.write "
    <h2>FILES</h2>Use the Browser BACK function to return to this page after clicking on an image name below.<blockquote>"
    Set filelist = folder.files

    ' iterate through the files and make them links
    For Each file in filelist
        response.write "
    <A HREF='"
        response.write folderspec & file.name
        response.write "'
    >"
        response.write file.name
        response.write "
    </A><br>"
    Next

    ' Now let's clean up after ourselves - destroy those objects 
    set folder=nothing
    set subfolder=nothing
    set filelist=nothing
    set fs=nothing

    ' a little bit more HTML formatting and we're done!
    response.write "
    </blockquote>" '<hr>
    %>
    Forgive the funky coloring - I couldn't get the code to show using the CODE tags so I used PHP.

    Also I did NOT write this code I borrowed it from somewhere and do not have proper source credit - my apologies.
     
  8. grantglock

    grantglock /dev/null

    Messages:
    219
    Likes Received:
    0
    Joined:
    Feb 20, 2004
    Location:
    Iowa
    dont bother with that .asp script, it won't work. Its for windows IIS webservers. ISP's dont use windows. In fact your FTP server is a BSDi machine.
     
  9. gwalchmai

    gwalchmai Lucky Member

    Messages:
    27,149
    Likes Received:
    5,550
    Joined:
    Jan 9, 2002
    Location:
    Outside the perimeter
    Get FileZilla server and host your own FTP. Then use a decent FTP client (FileZilla, for instance) and browse away.