View Full Version : ScanDir Directory on Users PC

01-23-2012, 05:08 PM
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.


01-23-2012, 05:51 PM
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.

01-23-2012, 06:05 PM
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.


01-23-2012, 06:10 PM
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.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum