Computing.Net > Forums > Web Development > auto scan folder and create links

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

auto scan folder and create links

Reply to Message Icon

Name: BE
Date: May 24, 2006 at 08:21:42 Pacific
OS: na
CPU/Ram: na
Product: na
Comment:

I would like to scan a folder, then create a webpage that has a link to all the files in that directory, then with a text box type in a number and with a search button open the PDF files as a help desk tool.
We create details as PDF on server now. I would like for our people who use VPN to able to pull and open these PDF's on our Intranet site.

It take time manually to update these files to web site page every day by adding a new link by hand, I want the web page to be automatically updated by scanning the folder, and removing links to files we've deleted, and adding links to files we've added.



Sponsored Link
Ads by Google

Response Number 1
Name: Michael J (by mjdamato)
Date: May 24, 2006 at 11:51:10 Pacific
Reply:

What kind of technology are you running on your webserver, in other words does it support VBScript, PHP, ColdFusion, or what? you would need something of that nature for the page to be created dynamically.

Not sure what this means "then with a text box type in a number and with a search button open the PDF files as a help desk tool.". If you have a link to each of the documents, what is the search box for?

Also, you could see if your web server supports folder browsing. Then instead of a page with all the links you just direct the user to the folder containing the files. The files would then be displayed in a directory view ike in explorer.

One last option is that you could create a "local" script that builds the static HTML page. Just create a schedule to run the script or run it manually and it could create the HTML page for you with all the links.

Michael J


0

Response Number 2
Name: BE
Date: May 25, 2006 at 05:52:18 Pacific
Reply:

The technology is windows server 2003. all of the files in question are converted out of solidwork to PDF, they are stored in a dir that all has rights to. We have a VB program that gen's ll the info to create, which is then pulled into SW.

We are creating a compnay intranet so our field people can get the info when we need it.

I would like to have a text box or list box that a number like 0001 or 1000 be entered and push a submit button and the PDF images be displayed.

I have all these PDF's linked now, but the powers to be do not like the many steps it take to get to the image.

I hope this will help

Thanks


0

Response Number 3
Name: Michael J (by mjdamato)
Date: May 25, 2006 at 06:32:41 Pacific
Reply:

OK, since the OS is 2003, I will *assume* that you are running IIS for the web server. IIS has native support for ASP pages (using VBScript). So, that would be the direction I would go. However, I'm not sure if you need to set up anything in order to enable ASP.

You could do a quick check to see if it is enabled by copying and pasting the following code into a text file, then save it as something.asp. Then copy to a directory within the "website" and point your browser to that file (relative to the webroot). If you see the tme displayed, ASP is enabled - if you see the same code displayed, you will need to get ASP enabled

<script language="vbscript">
Response.Write Time
</script>

Now, assuming ASP is enabled, a few more questions. How many PDF files are we talking about? What is the naming convention? How will the search work? For example if you search for '345' do you only want a PDF with the exact name of '345' or do you want to return partial matches? How partial: i.e. match the beginning, middle, end?

Michael J


0

Response Number 4
Name: BE
Date: May 25, 2006 at 06:53:36 Pacific
Reply:

I tested the code, and the same code was displayed.

How do I enable ASP?

Next we have about 100 files, but that will grow. Their naming convention is STD-DET-0000 thru STD-DET-0108, there is also a "," an a name list with each detail. so the files record listing would be "STD-DET-0000, Anchor Shoe".

They only want to see the image that is typed in and submitted to be shown.

BE


0

Response Number 5
Name: Michael J (by mjdamato)
Date: May 25, 2006 at 20:54:02 Pacific
Reply:

Take a look at this page on setting up IIS. Pay particular attention to step 5 to ensure that "run Scripts" is enabled on the web server.

http://www.phdcc.com/findinsite/instvirt.htm

Michael J


0

Related Posts

See More



Response Number 6
Name: eaglestuo
Date: June 6, 2006 at 07:16:13 Pacific
Reply:

IIS in working, PHP in installed. I still would like to be able to type in anumber like 0108 in a search box on an intranet form and the PDF file would be displayed.

BE


0

Response Number 7
Name: Michael J (by mjdamato)
Date: June 6, 2006 at 14:34:59 Pacific
Reply:

Very simple example. You would need to expand on it of course (changed <> to []):

[?php

if (isset($_POST['pdfID'])) {
header("Location: ".$_POST['pdfID'].".php");
}

else {
?]
[html][head][/head][body]
[form method="post" action="[?=$PHP_SELF?]"]
Enter PDF ID: [input name="pdfID" type="text" maxlength="20" /]
[br][br]
input type="submit" value="Submit" /]
[/form]
[/body][/html]
[?php
}
?]

Michael J


0

Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Web Development Forum Home


Sponsored links

Ads by Google


Results for: auto scan folder and create links

autoscan folder and create links www.computing.net/answers/webdevel/autoscan-folder-and-create-links/1252.html

Old script (post)- New Problem. www.computing.net/answers/webdevel/old-script-post-new-problem/3357.html

Auto Create Link to files HTML www.computing.net/answers/webdevel/auto-create-link-to-files-html/3710.html