Reply
Is this script possible?
Old 04-17-2008, 02:56 PM Is this script possible?
Skilled Talker

Posts: 99
Need a script for a windows server that does this:

When file xyz.txt arrives into directory C:/New/

a new folder is created in httpdocs/<domain name>/Folders/, named XYZ.

And a link is created in

httpdocs/<domain name>/Folders/XYZ/

The link looks like this:

a href="http://<domain name>/Folders/XYZ/xyz.txt

Then xyz.txt is moved to directory C:/Output/.
chrisj is offline
Reply With Quote
View Public Profile
 
Sponsored Links (We share ad revenue):
 
Old 04-17-2008, 05:08 PM Re: Is this script possible?
angele803's Avatar
Perfectly Imperfect

Posts: 1,324
Name: Stephanie
Location: Oklahoma
You can do this, but not with HTML. You will need a server side scripting language - Like PHP. I did something like this, but used coldfusion.
angele803 is offline
Reply With Quote
View Public Profile
 
Old 04-18-2008, 05:54 AM Re: Is this script possible?
ooyes's Avatar
Skilled Talker

Posts: 54
Name: Web Design Company
Location: London
it depends which web server you use also in Linux is much more easy
__________________
Website design
ooyes is offline
Reply With Quote
View Public Profile Visit ooyes's homepage!
 
Old 04-18-2008, 09:19 AM Re: Is this script possible?
chrishirst's Avatar
Super Moderator

Posts: 10,628
Location: Blackpool. UK
Quote:
Originally Posted by chrisj View Post
Need a script for a windows server that does this:
Moving to ASP forum.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Indifference will be the downfall of mankind, but who cares?
Code Samples | People Counting System
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 04-18-2008, 09:20 AM Re: Is this script possible?
chrishirst's Avatar
Super Moderator

Posts: 10,628
Location: Blackpool. UK
What indicates the arrival of a new file?
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Indifference will be the downfall of mankind, but who cares?
Code Samples | People Counting System
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 04-18-2008, 01:56 PM Re: Is this script possible?
Skilled Talker

Posts: 99
Thanks for your replies.
What indicates the arrival of a new file?
That is something I also need help with.
A windows scheduler perhaps?

What I need is more like this:

1. Watch a folder.
2. When any file arrives, create a directory using the file name as the new directory name. Created at: Domain/Folders/filename/file
3. Create a file named download.html, with this in this file:
html
body
a href = http : // domain name/Folders/filename/file
body
html

4. Store download.html in Folders/filename
5. Copy file from Watched Folder to C:/Output
6. Delete file from Watched Folder

Can this be done with an executable and a scheduler?
If so, can someone help me with an executable, please?

thanks
chrisj is offline
Reply With Quote
View Public Profile
 
Old 04-20-2008, 12:54 PM Re: Is this script possible?
ForrestCroce's Avatar
Half Man, Half Amazing

Latest Blog Post:
North Lake Union
Posts: 2,917
Name: Forrest Croce
Location: Seattle, WA
This is a case where .net is pretty compelling. It would take you about ten lines of code in global.asax. A FileSystemWatcher class lets you point at a folder and subscribe to notifications that a file has been created in that folder, or any subfolder underneath it if you'd like. Create one at the application level, write a method to process a file, and iterate it over that folder on the application's startup event, since the watcher will only live as long as your app does.
ForrestCroce is offline
Reply With Quote
View Public Profile Visit ForrestCroce's homepage!
 
Sponsored Links (We share ad revenue):
 
Reply     « Reply to Is this script possible?
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML


Page generated in 0.19084 seconds with 14 queries