Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    Regular Coder mOrloff's Avatar
    Join Date
    Nov 2008
    Location
    The Great Pacific NW, USA
    Posts
    424
    Thanks
    8
    Thanked 6 Times in 6 Posts

    How can I capture the file-path from a form rather than the file itself??

    I've got a huge stack of spreadsheets that I need to do some repetitive work on.

    I'm writing a little script to will help out with this, and instead of hard-coding the path of each file into the script one at a time, I'd like to be able to browse to a target file.
    Much like using an <input type="file"> form input, but without actually "uploading" it. All I need is the path (which will be relative to and accessible by the server).

    Does anyone know how to capture the path on submit rather than uploading the file?

    Thanks-a-bunch,
    ~ Mo
    Last edited by mOrloff; 03-02-2011 at 01:34 AM.
    ...because it's dundant already.

  • #2
    Banned
    Join Date
    Feb 2011
    Posts
    2,699
    Thanks
    13
    Thanked 395 Times in 395 Posts
    One option is you could use something like scandir or glob to generate a <select> of filenames or a list of filenames with checkboxes from which the user can select which files they want to process.

  • #3
    Master Coder
    Join Date
    Dec 2007
    Posts
    6,682
    Thanks
    436
    Thanked 890 Times in 879 Posts
    Quote Originally Posted by bullant View Post
    One option is you could use something like scandir or glob to generate a <select> of filenames or a list of filenames with checkboxes from which the user can select which files they want to process.
    will work but only if the browser owner is the server owner and the server is local,

    best regards

  • #4
    Banned
    Join Date
    Feb 2011
    Posts
    2,699
    Thanks
    13
    Thanked 395 Times in 395 Posts
    Since the op said

    Quote Originally Posted by mOrloff View Post
    All I need is the path (which will be relative to and accessible by the server).
    it should work

  • Users who have thanked bullant for this post:

    oesxyl (03-02-2011)

  • #5
    Master Coder
    Join Date
    Dec 2007
    Posts
    6,682
    Thanks
    436
    Thanked 890 Times in 879 Posts
    Quote Originally Posted by bullant View Post
    it should work
    i didn't say that would not work,

    best regards

  • #6
    Banned
    Join Date
    Feb 2011
    Posts
    2,699
    Thanks
    13
    Thanked 395 Times in 395 Posts
    I just clarified why I think it should work (it's no big deal), but I don't know exactly where on the server the files are located. The op, if they choose to, can try it. If it works, all well and good. If it doesn't then they'll have to come up with a plan B

  • #7
    Regular Coder mOrloff's Avatar
    Join Date
    Nov 2008
    Location
    The Great Pacific NW, USA
    Posts
    424
    Thanks
    8
    Thanked 6 Times in 6 Posts
    Great, thanks-a-bunch.
    Thanks Inigo, I'll look at JS (& flash) next.
    Thanks bullant, for putting me on the scandir and glob path.
    Thanks oesxyl, for pointing that out. That helped with my strategy.

    ~ Mo
    ...because it's dundant already.

  • #8
    Super Moderator Inigoesdr's Avatar
    Join Date
    Mar 2007
    Location
    Florida, USA
    Posts
    3,647
    Thanks
    2
    Thanked 406 Times in 398 Posts
    Quote Originally Posted by mOrloff View Post
    Thanks Inigo, I'll look at JS (& flash) next.
    That isn't necessary, I missed the part in your post where you wanted to list the directories on the server. bullant pointed you in the right direction.


  •  

    Posting Permissions

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