16 Replies Latest reply on Sep 8, 2008 4:03 PM by Newsgroup_User

    file directory.

    lachy455
      Hey Guys, i dont know if this is possible, but im building an intranet and there a page thats is going to link to lots of files, but these file will be contantly changing, adding and removing. i am wondering on that page is it possible to have a little window with a directory browser to go through the files?.

      Thanks
        • 1. Re: file directory.
          Level 7


          > but im building an intranet

          Is it a web server?
          If yes- then enable directory browsing for that folder. Use options to
          pretty it up.

          --
          Alan
          Adobe Community Expert, dreamweaver

          http://www.adobe.com/communities/experts/



          • 2. Re: file directory.
            lachy455 Level 1
            Yes that probally is an option but not quite answering my question which was was, is it possible to have a browsing window displayed on a webpage. that would show the contents,

            if this is not , what is the best way to link documents to be downloaded/viewed from a webpage and update based on new documents added to the directory, without me having to create a link.

            Thanks
            • 3. Re: file directory.
              bregent Most Valuable Participant
              I'm not sure what a 'browsing window' is exactly, but if you want to display files dynamically then you will need to use a server side script. Any scripting language you use will have the capability to read the server file system and then create a list of those files and allow the visitor to click on the link to open the file.
              • 4. Re: file directory.
                Level 7

                "lachy455" <webforumsuser@macromedia.com> wrote in message
                news:g9nrv2$5bs$1@forums.macromedia.com...
                > Yes that probally is an option but not quite answering my question which
                > was
                > was, is it possible to have a browsing window displayed on a webpage. that
                > would show the contents,

                what do you mean by "browsing window"? If you allow directory listing for
                that folder, it will list all files in that folder; it's a "live" view.


                > if this is not , what is the best way to link documents to be
                > downloaded/viewed from a webpage and update based on new documents added
                > to the
                > directory, without me having to create a link.

                that sounds like you're wanting more of a document management system and not
                an intranet - they're not really the same thing. Perhaps if you explained
                more of what you're wanting to accomplish, the purpose for this listing,
                people can give you better answers.


                • 5. file directory.
                  lachy455 Level 1
                  Elkington Park

                  Here is my own private web site, note that this is just for illustrative purposes it wont even be this directory or anything to do with this address.

                  Ok but as you can see it is what i would like but interactive, users will be constantly uploading new files , so creating links is to hard, or i need something that can display links and atomically update based on new files.

                  I also noticed something similar to this in c panel, on a file browser, some people would know what i meant if that have there own web space.

                  So is anything like this possible??

                  Thanks
                  • 6. Re: file directory.
                    bregent Most Valuable Participant
                    >So is anything like this possible??

                    I already answered that it is - using server side scripting.
                    • 7. Re: file directory.
                      lachy455 Level 1
                      Well can you explain further or give me some reference links, sorry i am bit of a noob when it comes to this.
                      • 8. Re: file directory.
                        bregent Most Valuable Participant
                        What scripting language will you be using? Just search the web for examples, like 'asp list files' or 'php list files' or something similar.
                        • 9. Re: file directory.
                          lachy455 Level 1
                          I will probably go PHP, but i am lost at how to customize these codes any hints?
                          • 10. Re: file directory.
                            Level 7

                            > $thelist .= '<a href="'.$file.'">'.$file.'</a>';

                            That scripting doesn't offer any easy way to customize the output.

                            suggest looking here for better scripts:
                            http://www.hotscripts.com/PHP/Scripts_and_Programs/File_Manipulation/Utiliti
                            es/index.html

                            this one sounds like a possible:
                            http://weblog.alkemic.co.cc/2008/07/projects-yaindexer-10.html
                            demo example
                            http://www.alkemic.yoyo.pl/yaIndexer/


                            --
                            Alan
                            Adobe Community Expert, dreamweaver

                            http://www.adobe.com/communities/experts/



                            • 11. Re: file directory.
                              Level 7

                              "lachy455" <webforumsuser@macromedia.com> wrote in message
                              news:ga1osg$5dg$1@forums.macromedia.com...
                              > http://www.elkingtonparkltd.com
                              >
                              > Here is my own private web site, note that this is just for illustrative
                              > purposes it wont even be this directory.
                              >
                              > Ok but as you can see it is what i would like but interactive, users will
                              > be
                              > constantly uploading new files , so creating links is to hard, or i need
                              > something that can display links and atomically update based on new files.
                              >
                              > So is anything like this possible??

                              all that is is a folder that allows directory browsing; that would be be
                              part of the server configuration (as to whether or not Directory Browsing is
                              allowed).


                              • 12. Re: file directory.
                                bregent Most Valuable Participant
                                >all that is is a folder that allows directory browsing; that would be be
                                >part of the server configuration (as to whether or not Directory Browsing is
                                >allowed).

                                This was already suggested, but it seems like the OP did not like that solution. It is the simplest to implement but you have no real control over the look and feel of the page.
                                • 13. file directory.
                                  lachy455 Level 1
                                  i am using one called indexor ( Link) atm, but turn out i need one that just displays the name not the type size and size, type,
                                  does anyone know a neat looking script that shows just name and the browsing functions, or know how to edit indexor to show just the name?

                                  Thanks
                                  • 14. Re: file directory.
                                    Level 7


                                    > atomically update

                                    I survived the cold war, but not this thread

                                    --
                                    Alan
                                    Adobe Community Expert, dreamweaver

                                    http://www.adobe.com/communities/experts/



                                    • 15. Re: file directory.
                                      bregent Most Valuable Participant
                                      Just remove those fields from the script.
                                      • 16. Re: file directory.
                                        Level 7
                                        On Mon, 8 Sep 2008 22:35:14 +0000 (UTC), "lachy455"
                                        <webforumsuser@macromedia.com> wrote:

                                        >i am using one called indexor ( http://0zz.org/dev/) atm, but turn out i need
                                        >one that just displays the name not the type size and size, type,
                                        > does anyone know a neat looking script that shows just name and the browsing
                                        >functions, or know how to edit indexor to show just the name?

                                        Try this (save it as index.php):

                                        <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
                                        " http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
                                        <html xmlns=" http://www.w3.org/1999/xhtml">
                                        <head>
                                        <meta http-equiv="Content-Type" content="text/html;
                                        charset=iso-8859-1" />
                                        <title>Directory</title>
                                        <style type="text/css">
                                        ul {list-style: none}
                                        ul, li{margin:0;padding:0}
                                        </style>
                                        </head>
                                        <body>
                                        <?php
                                        $d = dir(".");
                                        $dirs=array();
                                        $files=array();
                                        while (false !== ($entry = $d->read())) {
                                        if(substr($entry,0,1)!='.'){
                                        if(is_dir($entry))
                                        $dirs[]=$entry;
                                        else
                                        $files[]=$entry;
                                        }
                                        }
                                        natcasesort($dirs);
                                        natcasesort($files);
                                        echo "<ul>\n";
                                        foreach($dirs as $entry)
                                        printf("\t<li><a href=\"%s\">%s</a></li>\n",$entry,$entry);;
                                        foreach($files as $entry)
                                        printf("\t<li><a href=\"%s\">%s</a></li>\n",$entry,$entry);;
                                        echo "</ul>\n";
                                        $d->close();
                                        ?>
                                        </body>
                                        </html>

                                        Gary