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 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Jan 2012
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    ScanDir Directory on Users PC

    Hey Guys/Gals,

    I am working on an web application, I need my application to scan a directory on the users pc and list the contents... I.E C:\ADP\ ..
    is there anyway to reference this using scandir() or a similar function.. can I put file:// in front or ?


    Let me know if this is possible at all. The application is going to import files from a local directory on the users pc into the web database.

    Thanks,
    Kyle

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,979
    Thanks
    4
    Thanked 2,659 Times in 2,628 Posts
    Sure isn't. This would be a blatant security hole. PHP is a server side language, not a client language, so in order to navigate a client file system you will need to use a client language to do so.
    C# and Java can do this, and can be written to connect to php based website. Or the standard html input type file will work fine for finding a file the client wants to upload.

  • #3
    New to the CF scene
    Join Date
    Jan 2012
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks For the Reply..

    Here is what I want to accomplish:

    I am designing a Web Based App. There is a client side program that creates Export database files. I need to get the data out of these files and into my database (importing basically).

    What do you think is the best way to do this?

    I don't want the user to have to do anything except for push a button that imports any new files in the directory.

    The files are small (1k - 6k)...Transmitting them to my webserver to work with them there is a viable option. Is there any way I can make a web page that will scan the local directory and upload all the files it finds to the web server so I can work with them there?

    What language should I do this in? Do I need to build a client-side app that will upload the files instead?

    THanks For any advice.

    Kyle

  • #4
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,979
    Thanks
    4
    Thanked 2,659 Times in 2,628 Posts
    You will yes.
    Use C# for this. You can write as a service if you want, and knowing a location to where a file is stored is all that is required. Connecting to a remote location and using a put or soap or something would be fairly trivial to do.


  •  

    Posting Permissions

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