--- Emily Berk <[EMAIL PROTECTED]> wrote: > If you can do this by hand, you might want to just do it using a DOS > (Command) Window.
I guess I should have explained the purpose. What I want to do is give the user a way to select a directory on his/her computer, then pass the contents of that directory to PHP's FTP function so that the files within the directory are uploaded to the web server. In short, I'm trying to create a very simple, very easy-to-use browser-based FTP app for a client who either can't be bothered or doesn't have the "gumption" to learn how to use a real FTP app. Since this is a custom job, the user will always be connecting to the same server (their site). I just need a foolproof way to get the directory they select and pass the contents to the FTP function. I'm currently using Javascript to get the full local file path from a file input, and save it to a hidden field. For instance: <form action="ftptest.php" method="post" enctype="multipart/form-data"> <input id="srcdir" type="file" name="srcdir" onclick="getdir()" /> <input id="srcpath" type="hidden" name="srcpath" /> <input type="submit" name="submit" value="Submit" onclick="movepath()" /> </form> The javascript in question: <script type="text/javascript"> function movepath() { var thepath = document.getElementById('srcdir').value; document.getElementById('srcpath').value = thepath; } </script> This passes the full path (such as '/Library/Apache2/htdocs/bob/' on Mac OSX) of the local directory to the hidden form field to be passed on to the FTP function. HOWEVER... the FTP function can't use the local file path as-is, so I need to use that info to gather the contents of the directory to pass to the FTP function instead. That's what I'm trying to do. Any ideas? Thanks, -Bob __________________________________ Do you Yahoo!? Yahoo! Personals - Better first dates. More second dates. http://personals.yahoo.com Community email addresses: Post message: php-list@yahoogroups.com Subscribe: [EMAIL PROTECTED] Unsubscribe: [EMAIL PROTECTED] List owner: [EMAIL PROTECTED] Shortcut URL to this page: http://groups.yahoo.com/group/php-list Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/php-list/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/