You know, the only reason I've heard discussed as to why directory contents can't be uploaded en masse like single files, is security.
But what is the difference, except numbers of files, between a client specifying a single file for upload vs. an entire directory for upload? I don't see what the security issue is... And, after working through some code, I've come to conclude that the only way to upload more than one file at a time is to do what I've done in the past...instead of a single CFFILE in a form, I would include 5 CFFILE's in a form and the client could at least upload 5 files at a time, rather than one. I guess this is the only way, because I see that there's no way for CFDIRECTORY to read the contents of a users directory, even if they specify the directory. Oh well...it was a good discussion. Thanks for the input everyone! Rick -----Original Message----- From: Rick Faircloth [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 09, 2005 6:24 PM To: CF-Talk Subject: RE: How to Browse and Choose Directory... Interesting...thanks, Rebecca. So, they would pick the first file, then I would use the path of that file to upload the other files in their directory? Rick -----Original Message----- From: Rebecca Wells [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 09, 2005 4:52 PM To: CF-Talk Subject: Re: How to Browse and Choose Directory... Here's a little javascript majick to do the trick. Create a little javascript like this: <InvalidTag type="text/javascript"> function getFile(f) { f.directory.value = f.uploadFile.value; } </script> Then in the body of the page, your form is like this: <form action="" method="post" enctype="multipart/form-data" name="uploadForm"> Browse to your file directory (pick a file): <input type="file" name="uploadFile" size="35" onblur="getFile(this.form);"><br> <input type="hidden" name="directory"> <input type="submit" value="submit"> </form> When the form is submitted, it will pass the full path of the file that was selected. Then you can use the CF function Get DirectoryFromPath(path) to get just the directory path you want to use. HTH. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:198082 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

