Results 1 to 9 of 9

Thread: file path code

  1. #1
    Join Date
    Nov 2005
    Location
    under your bed
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default file path code

    Hello again, I was wondering if anyone knew if it is possible to have a download automaticly go to a preset file path? for example: Having someone click the download link and have it go to a folder that I set in the html.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    How do you know what folders are on the user's computer?
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by wibumba
    I was wondering if anyone knew if it is possible to have a download automaticly go to a preset file path?
    No, that would be a security risk.

    Someone could, for example, name a file explorer.exe and default the path to C:\Windows. It's almost guaranteed that some unobservant user would accept these defaults, and that would be catastrophic on a Windows operating system, and even some Windows NT[1] installations.

    The other reason, besides what John wrote, is that different operating systems have very different file system structures. Unix (and similar) don't have a concept of drives, for instance.

    Mike


    [1] C:\WinNT is a common path for NT installations, but C:\Windows is also possible. That directory should be read-only to non-administrative users, but unfortunately, some don't create separate user accounts so they'd still be vulnerable.

  4. #4
    Join Date
    Nov 2005
    Location
    under your bed
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I see your point. I am not some trouble maker trying to destroy people's windows. I wanted to use this code my psp site PSP for downloading mpeg4 video files. Since these video files have to go to a specific folder in the psp, I thought I would make it easier to download them for all my users.

    I would understand if you think it would be a bad idea to offer anyone a code like that if it did exist.

  5. #5
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    We're not saying you are. The point is, someone else could be. This is why the creators of browsers wouldn't include the means to do such a thing.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  6. #6
    Join Date
    Nov 2005
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    You could always parcel up the files with an installer program and that would allow you to set a default installation path. The user would have an opportunity to select their own location during the install if it didn't match their own hardware setup.

  7. #7
    Join Date
    Nov 2005
    Location
    under your bed
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    no, it's okay. I dont think I could script an
    installer program that could work on a psp.
    i guess I would have to trust people not to
    screw up the file path when they download
    my stuff. thanks for your help guys.

  8. #8
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Yes, that is how it is done. Wether a live install or an install from either a downloaded installer or bootstrap file, the developer trusts the user to make the correct choices as to paths and other options. If some aspect of the install is critical, this should be spelled out clearly, both on the page where the download is available and on all pages that have a direct link to it.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  9. #9
    Join Date
    Nov 2005
    Location
    under your bed
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    of course

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •