Solved

Auto delete files

Posted on 2002-03-19
4
116 Views
Last Modified: 2013-12-28
I have a camera server that uses FTP to upload images to a workstation every second.  I'm looking for a utility or simple script that will delete files from the image directory to automate the archival process so there is always 2 weeks worth of stored images.  Can someone recommend a free or inexpensive way to do this?  The machine that the files are sent to runs Win 98.  Thanks!

LMar
0
Comment
Question by:lmar
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 17

Accepted Solution

by:
rayt333 earned 100 total points
ID: 6881708
How do you have it set to name the pictures, does it use the date in the name or anything? What I am thinking is can you set it so it runs the names of the files in a 2 week cycle, so then when it starts the cycle over after 2 weeks then it is simply replacing the old file of the same name with the new one.
0
 
LVL 3

Expert Comment

by:CyberStretch
ID: 6883219
Another couple of possibilities. You could:

1) Set the script up to check either the Modified or Last Access Dates of the files in the directory, compile a list based off your date criteria (possibly even automate it to take the current date and subtract 2 weeks), and use the sorted list as basis for the files to delete.

2) Set up the FTP directory on the Server or the Workstation according to biweekly dates (ie: 031702, 033102, etc) and have the current FTP session point to the new directory every two weeks. This would make deleting the files easier, as all you would have to do is use deltree to get rid of the old folder and all of its contents.

0
 
LVL 1

Expert Comment

by:Computer101
ID: 7134455
Hello all,
I am Computer101, a moderator from Experts-Exchange and also an expert within this topic area. This uestion has been open a long time.  What I am going to do is allow feedback from the questioner and xperts.  If it is not resolved, I will delete or accept an answer based on the info I have been given, Experts, feel free to offer input.  I will monitor these questions for a period of 5-7 days and come back and evaluate.  I will have another moderator (who is also an expert in this topic area) look at the question also to ensure we do the right thing for this question.

Thank you
Computer101
Community Support Moderator
0
 
LVL 1

Expert Comment

by:Computer101
ID: 7348446
Comment from expert accepted as answer.  Cyberstrectch, look for your question in this topic area.

Computer101
E-E Admin
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

A project that enables an administrator to perform actions within a user session context not just at the time of login but any time later on day(s) or week(s) later.
Ever visit a website where you spotted a really cool looking Font, yet couldn't figure out which font family it belonged to, or how to get a copy of it for your own use? This article explains the process of doing exactly that, as well as showing how…
This Micro Tutorial will give you a basic overview of Windows DVD Burner through its features and interface. This will be demonstrated using Windows 7 operating system.
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…

695 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