Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


IIS FTP Server Event Triggers

Posted on 2003-02-28
Medium Priority
Last Modified: 2012-06-21
We use our FTP Server to communicate with the outside world. Our Application puts the files in specific directories and the customers come and pickup the data. Is there a way to catch that event and have some custom code to delete the file as soon as the file is picked-up by the customer.

Question by:smovva

Accepted Solution

tncbbthositg earned 152 total points
ID: 8043105
Not via ftp.  You could tell the customers to delete it but I wouldnt suggest it.  You can, however, create a subroutine that checks the creation date, compares with the new date, then deletes old files.  You could also check the last access date.  If the file was last accessed on it's creation date, nobody has retrieved it.  Otherwise, the dates would be different.

Hope this helps,
LVL 19

Assisted Solution

webwoman earned 148 total points
ID: 8043822
You could also do it differently -- if they come in through an ASP page and grab the file, you could set it so that it deleted the file after it was grabbed.

Or you could have them log in, get a file list, grab the file, click on a checkbox to indicate it can be deleted, and delete it that way.

Or you could have them grab the file, change the file attribute to hidden, fire off an email to let them know the file will be deleted unless they respond differently, and then delete it next time they log on.

There are lots of ways, but you don't want to delete the file until you're SURE they've grabbed it. Transfers mess up, files get corrupted, etc. I certainly would be highly upset if I tried to grab the file, it got corrupted in transfer, and I couldn't go back and get it again.

Author Comment

ID: 8072701
I need to know if the transmission of the data is successful and then delete the file. Is there a way to capture the Event when the file was succesfully transmitted and then the FTP server notifies my code?

Please let me know.
Thanks alot
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Expert Comment

ID: 8074409
You could ask them.  After they download the file, have them press a button confirming that it has arrived.

LVL 19

Expert Comment

ID: 8076363
There's no way you can tell if the file actually downloaded correctly. It could download, and be corrupted, it could start and they could be disconnected, or they could delete it by mistake before they used it.

You really do need to ask them BEFORE you delete the file. Actually, I wouldn't really delete it, even if they DID verify they'd received it. I'd just move it or set it to hidden, so you could not show it in the links.

People make mistakes, and if it's gone and can't be reconstructed and they really need it, it's going to be YOUR fault. Better to err on the side of caution, and be able to play the savior when they need a miracle. ;-)

Expert Comment

ID: 8077321
Thanks for agreeing webwoman.  I was beginning to think that you just disagreed with anything I said :)

LVL 19

Expert Comment

ID: 8085327
Nah...sometimes it's just not clear what the question is, and there's almost always more than one  way (or 10!) to do something.

But here, there's really only one way. ;-)
LVL 53

Expert Comment

ID: 9350351
This question has been classified abandoned. I will make a recommendation to the
moderators on its resolution in a week or two. I appreciate any comments
that would help me to make a recommendation.

Unless it is clear to me that the question has been answered I will recommend delete.  It is possible that a Grade less than A will be given if no expert makes a case for an A grade. It is assumed that any participant not responding to this request is no longer interested in its final disposition.

If the user does not know how to close the question, the options are here:



Featured Post


Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article was originally published on Monitis Blog, you can check it here . Today it’s fairly well known that high-performing websites and applications bring in more visitors, higher SEO, and ultimately more sales. By the same token, downtime…
When it comes to security, close monitoring is a must. According to WhiteHat Security annual report, a substantial number of all web applications are vulnerable always. Monitis offers a new product - fully-featured Website security monitoring and pr…
The viewer will learn how to count occurrences of each item in an array.
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.
Suggested Courses
Course of the Month15 days, 13 hours left to enroll

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question