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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

browse for folder on client pc 1

Status
Not open for further replies.
Yes but only as the result of client side action.
You would need to use activeX controls to do the browsing or do it as a result of an input="File".

You could use a .VBS or .HTA file to execute client side code with wscript.shell or WSH but that requires the client to download and execute the file which may first prompt them with warnings about executing ActiveX.


Paranoid? ME?? WHO WANTS TO KNOW????
 
The client PC is protected so any code that would browse or upload files from the client to the server have to be initiated from the client side.

Is this something that you are trying to have happen automatically to people that visit your site or is it a method for you to upload new pages to the web server and only a few people would ever use it?

As I said, you could write a .VBS or .HTA file that uses client side VBA (or even Javascript) that is perfectly capable of browsing folders and files and copying them but it has to be executed on the client computer as a direct action of the client. If your need is for a limited group of people to be able to transfer files and folder structures then they would probably know to execute this particular program file rather than just the web version.

You can always deliver the .hta or .vbs file to them from the web but they have to select to execute it and it will give security warnings.


Paranoid? ME?? WHO WANTS TO KNOW????
 
mmm that sounds interesting. Yes it is for a content managment system. the idea is to upload the whole directory and recreat it folder for folder, file fo file on the server.



}...the bane of my life!
 
Then look into Windows Script Host scripting.

I have used scripts for reading, writing, copying, deleting, creating files/folders with it. I have not read through an entire folder tree grabbing all files as I go though. It should not be difficult to do though. You will not be able to do it through ASP but the code could be VBA or Javascript for the client side file.

If you use HTA (HTML for Applications) you write the whole thing like a web page that executes locally with client side script.

The one difference is that you would be moving your files to the server based on the servers name\folder path, not based on the web server settings. So you would have to make certain the person executing the script has local permissions to the folders it is working with on the server.


Paranoid? ME?? WHO WANTS TO KNOW????
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top