473,473 Members | 1,834 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

extra files on server

Hi have a .net web application using crystal reports. I ended up exporting
the reports to the server since I needed to dynamically change the default
name of each. Anyhow just wondering if there is any automatic cleanup
procedure I could impliment to delete files that are a week or more old? The
files are named for example 6_21_2007report1.pdf.
Thanks
--
Paul G
Software engineer.
Jun 21 '07 #1
1 1098
Hi,

Paul wrote:
Hi have a .net web application using crystal reports. I ended up exporting
the reports to the server since I needed to dynamically change the default
name of each. Anyhow just wondering if there is any automatic cleanup
procedure I could impliment to delete files that are a week or more old? The
files are named for example 6_21_2007report1.pdf.
Thanks
If you want to make sure that the files are cleaned up on a regular (and
predictible) schedule, you will need to implement something on the
server itself, for example a Windows service. However, often that is not
possible (for example if you use a shared server hosting).

The usual approach for this is to use the Session_End event handler (in
Global.asax) to perform some clean up operation. This way, every time a
session terminates, the files are checked and possibly cleaned. The
downside is that it's possible that you have files older than 1 week on
your server (if noone connects for longer than a week). On the other
hand, if noone uses the application for a week, then the traffic is very
low and it doesn't really matter if files are just sitting on the server.

HTH,
Laurent
--
Laurent Bugnion [MVP ASP.NET]
Software engineering, Blog: http://www.galasoft.ch
PhotoAlbum: http://www.galasoft.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch
Jun 22 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Sean Lambert | last post by:
We had someone create an extra data file and log file for tempdb. So we currently have two data files and two log files. Is it possible to delete the newly created data and log files? If I just...
10
by: Tank | last post by:
First off let me say that I am by no means a skilled programmer so i probably have made a dozen mistakes in my attempt at coding my problem. I will tell you the problem so that you have an idea of...
11
by: cdkorzen | last post by:
I'm sorry if this is a rehash, but all I see is the same info. Here's my debacle: I CAN get the PATH_INFO to work. With ANYTHING but ASP. Python, Perl, Cmd files... works fine. ASP can't...
3
by: majlandt | last post by:
I have the below function witch I use to send mail to reciptents on my maillist from an .asp side I am about to make a bounce back system - and would therefore like to make one extra MailHeader...
2
by: binder | last post by:
How do I eliminate an extra backslash that is appearing after LoadXML call? This issue is causing an error with Process.Start. I have a string stored in sql: c:\program files\internet...
5
by: rweth | last post by:
I am using nntplib to download archived xml messages from our internal newsgroup. This is working fine except the download of files to the connected server, has extra embedded lines in them (all...
8
by: dancer | last post by:
Using ASP.net 1.1 to create user input form. When I put a RequiredFieldValidator I have extra space at the bottom of the cell, as if I had put a <br>. When I comment out the...
4
Fary4u
by: Fary4u | last post by:
Hi for the last few months i've just stuck in 1 error & i don't know how to figer it out could any body find out where is the problem gonna be ? it's working fine but when u add product into...
0
by: odednaftali | last post by:
Hello I'm writing a video recorder that records input from an external device I use multipule files capture, and every X minutes i stop the graph, set the output file name to another file and...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.