Login

Latest postings for ASP/ VbScript.
Daily Code Email
|
|
| |
|
Shares Files/Folders on a website directory
|
|
|
|
|
Submitted on: 9/5/2000 2:31:41 PM
By: Fares Rihani
Level: Beginner User Rating: Unrated Compatibility:ASP (Active Server Pages), HTML, VbScript (browser/client side)
Users have accessed this article 13691 times. | (About the author) |
| | | Shares Files/Folders on a website directory. This article has accompanying files | | | | Terms of Agreement:
By using this article, you agree to the following terms...
1) You may use
this article in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
2) You MAY NOT redistribute this article (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.
3) You may link to this article from another website, but ONLY if it is not wrapped in a frame.
4) You will abide by any additional copyright restrictions which the author may have placed in the article or article's description.
|
Create a dynamic navigation system to allow users to successfully
navigate, view, and read files placed in a directory on the web server.
This directory may contain any number of files of any file type as well
as any number of subfolders.
Upload this file into the same folder as the folder to be shared, and
specify the folder's name in the variable 'sDirectory'. This script
also has many configurable options.
Configurable options include:
Alternating row colors for both files and folders
Show / Hide navigation path above grid
Show / Hide navigation path root name
Main page font tag, column header font tag
Table header color
Allow / Deny file extensions in array form; powerful function included
Display 'friendly' bytes for file size
To install simply unzip the included file into the same directory as your target directory, and change the default directory name of "Source" to your specific directory name. Also note the other options explained in the script.
This was created to show many different techniques in vb scripting. The use of arrays, objects (FileSystemObject), for..next loops, and a configurable structure all come together in this commented, full application. Feel free to post feedback on this submission, as well as direct questions to me at frihani@hotmail.com. I hope this will help you develop and add to your own coding techniques.
GOOD LUCK! | |
Download article
Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.
Virus note:All files are scanned once-a-day by Planet Source Code for viruses,but new viruses come out every day, so no prevention program can catch 100% of them.
FOR YOUR OWN SAFETY, PLEASE: 1)Re-scan downloaded files using your personal virus checker before using it. 2)NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.
If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com
| Terms of Agreement:
By using this article, you agree to the following terms...
1) You may use
this article in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
2) You MAY NOT redistribute this article (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.
3) You may link to this article from another website, but ONLY if it is not wrapped in a frame.
4) You will abide by any additional copyright restrictions which the author may have placed in the article or article's description.
| |
| | |
Report Bad Submission | | | | | Your Vote! | |
See Voting Log | | | | Other User Comments |
9/5/2000 2:38:58 PM: Fares Rihani
Please don't hesitate to post comments right here! also, throw out some requests, bugs, or better techniques.(Hey Lewis, how about modifying the array system for file extension control into one that uses regular expressions?) (If this comment was disrespectful, please report it.)
|
2/11/2002 9:30:50 AM: Or Cingilli
How can I specify a certain number of folders to display per page? (If this comment was disrespectful, please report it.)
|
6/26/2003 11:10:50 AM:
Is there a way to force the standard box of "Open this files from its current location or Save file to disk" from your program? I don't wat to execute .ppt files from the browser.
(If this comment was disrespectful, please report it.)
|
11/20/2003 11:08:43 AM: Fares Rihani
I think ppt files are opened by default according to IE settings and the fact that you have a viewer installed. Just rename the file or even zip it and the prompt to (If this comment was disrespectful, please report it.)
|
11/20/2003 11:09:17 AM: Fares Rihani
save file to disk will be shown. (If this comment was disrespectful, please report it.)
| | |
Add Your Feedback! | Note:Not only will your feedback be posted, but an email will be sent to the code's author from the email account you registered on the site, so you can correspond directly.
NOTICE: The author of this article has been kind enough to share it with you. If you have a criticism, please state it politely or it will be deleted.
For feedback not related to this particular article, please click here. |
To post feedback, first please login. | |
|