Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

ASP.NET Forum


You are currently viewing our ASP.NET Forum as a guest. Please register to participate.
Login



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

Posts: 216
Trades: 0
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
 
 
Register now for full access!
Old 04-17-2008, 06:08 PM Re: Is this script possible?
angele803's Avatar
Perfectly Imperfect

Posts: 1,774
Name: Stephanie
Location: Oklahoma
Trades: 2
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.
__________________

Please login or register to view this content. Registration is FREE
angele803 is offline
Reply With Quote
View Public Profile
 
Old 04-18-2008, 06:54 AM Re: Is this script possible?
ooyes's Avatar
Skilled Talker

Posts: 55
Name: Web Design Company
Location: London
Trades: 0
it depends which web server you use also in Linux is much more easy
__________________

Please login or register to view this content. Registration is FREE
ooyes is offline
Reply With Quote
View Public Profile Visit ooyes's homepage!
 
Old 04-18-2008, 10:19 AM Re: Is this script possible?
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
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!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 04-18-2008, 10:20 AM Re: Is this script possible?
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
What indicates the arrival of a new file?
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 04-18-2008, 02:56 PM Re: Is this script possible?
Extreme Talker

Posts: 216
Trades: 0
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, 01:54 PM Re: Is this script possible?
ForrestCroce's Avatar
Half Man, Half Amazing

Posts: 3,023
Name: Forrest Croce
Location: Seattle, WA
Trades: 0
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.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
ForrestCroce is offline
Reply With Quote
View Public Profile Visit ForrestCroce's homepage!
 
Reply     « Reply to Is this script possible?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB 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.43237 seconds with 12 queries