Hi All web experts,

I have a Archive file folder, and it have few categories which is divided in years, and the files are named as month-date (eg. 07-26.pdf). There are old scanned documents mostly in PDFs, and doc files.These are available in a shared folder on our file server.

I need to organize the whole list in a web page, so the users can access the files without opening each and every files from the year or month.

How can I achieve it without having a web server, as File-Folders are on file server's shares.

Or If I need to have a web based solution, can any one guide me or recommend any freely available solution for it.
Does any java script work without web server?
Also If dropdown menu work for the year and month can be achieved?

Thanks

Dani AI

Generated

A reliable, low-friction approach is to host a tiny web app on any machine that can read the archive share and let that app be the only thing that touches the file system. Browser JavaScript cannot safely enumerate arbitrary network shares or peek into server folders — the browser-side File System APIs require explicit user picks — so a server-side index is required. (developer.mozilla.org)

Practical steps (IIS-friendly since you mentioned IIS):

  1. Create a virtual directory that points to the UNC path (\server\share) and use “Connect as…” with a service account that has only read access. Test the virtual directory in IIS Manager. (learn.microsoft.com)
  2. Ensure the application pool identity or the chosen account has NTFS/share read permissions (use an app-pool account or a domain service account; don’t run as high-privilege). If you hit 403 errors, check the app pool identity and ACLs first. (learn.microsoft.com)

Architecture and UX: have the server provide a small JSON API that returns the archive tree grouped by category → year → date (the server uses folder names for year and the file names for month/day). Example endpoint: GET /api/files?category=HR&year=2014&date=07-26. The client can request the list and render your calendar and dropdowns; that keeps UI logic clean and lets you add search, pagination and caching later. ’s directory-listing idea is a good quick-start; for production, return structured JSON rather than raw directory HTML so the front-end can build the calendar reliably.

Security and extras: do not enable directory browsing in production — serve files through a controlled handler/API instead. Validate and sanitize any user-facing filenames, use HTTPS, and consider antivirus or content-disarm (for PDFs/DOCs) where appropriate. For in-browser PDF previews use a library like PDF.js. (aspnetcore.readthedocs.io)

Troubleshooting tip: if performance is slow when serving large files from a UNC share, enable caching on the web tier or copy frequently-accessed archives locally; IIS has known edge cases when serving very large files from remote shares. (support.microsoft.com)

References: IIS UNC/virtual-dir docs, IIS app-pool identity docs, MDN File System API, OWASP File Upload guidance, PDF.js (links embedded above).

Recommended Answers

All 9 Replies

Does any java script work without web server?

Yes, but I doubt Javascript will have access to your shared files.

If I need to have a web based solution

If you are allowed to install XAMPP or WAMPServer, or even IIS Express then you can build a script.

I was think of adding a calendar with clickable dates to open all the list of the files on that date, under tabs for each categories.

I think you need to decide first if you can install a webserver.

How can I link the web server to access file from the File server's shared location/folder

Install the webserver on the file server, or any other machine that can access them without a hitch.

OK, IIS will be file for me. But after the web server whats next?

A script to read the available files, and return them if requested.

how to approach the project?
How would it be listed? and have categories listed with the year and dates.

read the folder tree and link the files

    <?php ob_start("ob_gzhandler");?>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd"><html><head>
    <meta http-equiv='Content-Type' content='text/html;charset=utf-8'>
    <style type='text/css'>
    body{background:url(d.jpg) no-repeat center right fixed;
    background-color:#f6f6f6;color:#000000;
    font-family:verdana, geneva, arial;margin:2%;}}
    ul {list-style-type:none;}
    ul.dirlist{list-style-type:none;padding-left:0.5em;
    margin-bottom:0.2em;text-transform:capitalize;font-weight:normal;}
    ul.dirlist li{padding-left:0.5em;margin-bottom:0.3em;
    font-size:0.7em} 
    ul.dirlist li:first-letter{font-size:1.3em;}
    ul.dirlist li a:hover{font-size:1.3em;
    font-weight:bold;background:#b0b0b0;}
    ul.dirlist li a{font-size:1.3em; 
    font-weight:bold;background:#f0f0f0;}
    .logo{background:transparent;text-align:right;
    font-size:85%;top:auto;left:auto;
    bottom:1px;right:1px;position:fixed;}
    .smalltext{background-color:#f6f6f6;font-size:85%;} 
    .tinytext{background-color:#f6f6f6;font-size:70%;}
    .text{background-color:#f6f6f6;font-size:100%;}</style>
    <title>pamphlets</title></head>
    <body>
    <h3>equipment pamphlets</h3>
       <span class='tinytext logo'>&copy;</span>
    <ul class='dirlist'>
    <?php $it=new RecursiveIteratorIterator(new RecursiveDirectoryIterator('.'));
    //line below, select displayable filetypes
    while($it->valid()){if(!$it->isDot()){if(stripos('-pdf-zip-',substr($it->key(),-3))){
    echo '<li>'.str_replace("_","&nbsp;",str_replace("/",": ",$it->getSubPath())).":\n<a href='".$it->key()
    ."'>\n".str_replace("_","&nbsp;",str_replace("\\","",substr(trim($it->key(),"\ ."),strlen($it->getSubPath()) +2)))
    ."</a><span class='smalltext'> ".number_format((filesize($it->key())/1024),0)
    ."KB</span>\n";
    . '<span class="text"><b> '.date("jS M Y",filemtime($it->key())).'</b></span>';
    . "</li>\n";}} $it->next();} ?>
    </ul></body></html><?php ob_flush();?>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.