Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Upload Directory Instead of File? 1

Status
Not open for further replies.

Glowball

Programmer
Oct 6, 2001
373
US
Hi all, is it possible for a user to select a directory on their client machine and then upload all files in that directory to a Web server? I think it probably isn't possible but I thought I'd run it past the group.

Anyone have any thoughts about faking this behavior?

TIA
 
Using PHP? No. Something would have to run on the client to accomplish this, and PHP runs on the server, not the client.

If one were to install PHP on one's workstation, I suppose it's possible to write a script that could traverse a directory tree, creating directories and uploading files as necessary. But this is not going to happen through a web interface. It would be more like a standalone PHP script interaction with an FTP server or a web application.


Want the best answers? Ask the best questions!

TANSTAAFL!!
 
Hey thanks for the quick response. It was a long shot but you never know until you try...
 
you could create a directory that looks like Windows Explorer using javascript. Save the paths of the files selected into variables. Then use a multiple upload, which you can find on here by searching, to upload all the files that were selected.

Other than using an actual FTP client, i don't know of any other way than this.

David

David Kuhn
------------------
 
I'm researching it now but I didn't think JS could do that either. Someone suggested Flash to me -- think that would work? Put some PHP on the back end to handle it, but allow for file selection in Flash. I'm not a Flash developer so I'm not sure.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top