SoftwareTipsandTricks Forum

Go Back   SoftwareTipsandTricks Forum > Operating Systems > Windows NT/2000/2003
User Name
Password


Delet Files based on changing Filename

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes

  #1  
Old 12-28-2008, 04:08 PM
melissam1979 Offline
Registered User
 
Join Date: Dec 2008
Location: Melbourne, AU
Posts: 1
Send a message via MSN to melissam1979
Delet Files based on changing Filename

Hello All,

I am a newbie to batch files and mass deleting of files but an expirenced user of Windows Server 2003/Windows XP.

We have a folder on our shared drive that has a file for each day. Eg. 0112CANT.dfa, 0212FLEM.dfa. The filename is made up of DDMM????.*

I am trying to create a batch file that will delete files older than todays date by using the DDMM in the filename and NOT the date created/modified system date on the file. This is because in most cases a file will be created for a future date and i dont want to get rid of those future dates.

I have been doing it manually by changing the date in the batch file, but i need to automate this if possable.

This is what i have so far:
date /t >> cleanup.log
time /t >> cleanup.log


echo ***** Start of Cleanup of December Meetings *****
if exist \\risaserver\appsprod\prod\rsb\rsbdata\2712*.* del \\risaserver\appsprod\prod\rsb\rsbdata\2612*.* >> cleanup.log
if exist \\risaserver\appsprod\prod\rsb\rsbdata\2712*.* del \\risaserver\appsprod\prod\rsb\rsbdata\2712*.* >> cleanup.log
if exist \\risaserver\appsprod\prod\rsb\rsbdata\2812*.* del \\risaserver\appsprod\prod\rsb\rsbdata\2812*.* >> cleanup.log

Can someone help me please?
Melissa
Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help me retrieve my missing/hidden media files Silverback2000 Software Problems and Useful Utilities 7 04-14-2007 03:18 AM
hard drive "not formatted" error; PLEASE HELP! kfranken Hardware Problems 2 11-22-2006 01:53 AM
Help!!!! - Missing Files kentjohnson Windows XP 12 01-08-2006 01:31 AM
IE download problem for files with multiple periods in the filename banu Internet 1 10-08-2004 08:44 PM
Huge Hidden Files human_robot123 Windows XP 3 11-12-2002 08:23 PM



All times are GMT -5. The time now is 04:05 PM.


Designed by eXtremepixels. Powered by vBulletin Version 3.5.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
SEO by vBSEO 2.3.2 © 2005, Crawlability, Inc.