Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Computer Certification > MCSE > Scripts

Reply
Thread Tools

Scripts

 
 
Worm
Guest
Posts: n/a
 
      11-16-2004
I know this is not a cert question, but it is most likely a question anyone
in the IT industry could use, so, here goes...I need a bat file that will
delete and directory that is more than 7 days old. I need to set this up on
a schedule so the video logs files do not fill up the drive. Any ideas?
Thanks!


 
Reply With Quote
 
 
 
 
Neil
Guest
Posts: n/a
 
      11-17-2004
incase you missed it "Worm" <(E-Mail Removed)*m> said in
news:#(E-Mail Removed):

> I know this is not a cert question, but it is most likely a question
> anyone in the IT industry could use, so, here goes...I need a bat file
> that will delete and directory that is more than 7 days old. I need to
> set this up on a schedule so the video logs files do not fill up the
> drive. Any ideas? Thanks!
>
>
>


look into robocopy

--
Neil MCNGP #30
"Human beings, who are almost unique in having the ability to
learn from the experience of others, are also remarkable for
their apparent disinclination to do so."

Doug Adams
 
Reply With Quote
 
 
 
 
Worm
Guest
Posts: n/a
 
      11-19-2004
Schweet! Thanks!

"Neil" <guess!!!@gmail.com> wrote in message
news:Xns95A3E99D0F5F7neilmcsegmailcom@207.46.248.1 6...
> incase you missed it "Worm" <(E-Mail Removed)*m> said in
> news:#(E-Mail Removed):
>
>> I know this is not a cert question, but it is most likely a question
>> anyone in the IT industry could use, so, here goes...I need a bat file
>> that will delete and directory that is more than 7 days old. I need to
>> set this up on a schedule so the video logs files do not fill up the
>> drive. Any ideas? Thanks!
>>
>>
>>

>
> look into robocopy
>
> --
> Neil MCNGP #30
> "Human beings, who are almost unique in having the ability to
> learn from the experience of others, are also remarkable for
> their apparent disinclination to do so."
>
> Doug Adams



 
Reply With Quote
 
Kev
Guest
Posts: n/a
 
      11-24-2004
this will delete the oldest directory in the folder I use
this for autoclean up and schedule to run daily. Just a
simple batch file. Some of the lines may wrap, hope you
can follow.

begin batch
--------------------------------------

@Rem Purpose: Remove oldest directory in folder
@Rem Last Author: KTC

@Rem get bare directory list in reverse date order

dir \\gwpp09\bckpc\ /a:d /b /o:-d>c:\1.txt


@Rem set deldir var as read thru 1.txt last set will be
oldest directory
for /f %%1 in ('type c:\1.txt') do set deldir=\\gwpp09
\bckpc\%%1


@Rem Windows NT+ will remove directories files and subs
rd /S /Q %deldir%

----------------------------
end batch
Kev

>-----Original Message-----
>I know this is not a cert question, but it is most likely

a question anyone
>in the IT industry could use, so, here goes...I need a

bat file that will
>delete and directory that is more than 7 days old. I need

to set this up on
>a schedule so the video logs files do not fill up the

drive. Any ideas?
>Thanks!
>
>
>.
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

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 On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using Python Scripts with IIS - ASP or Python-based CGI scripts withIIS - which makes more sense? davidj411 Python 0 06-27-2008 04:38 PM
What is required for perl scripts to run correct when launched from rc scripts on HPUX 11? deanjones7@gmail.com Perl Misc 13 09-10-2007 11:58 AM
Stupid question: Making scripts python-scripts Jan Danielsson Python 8 07-22-2005 12:20 AM
Re: Stupid question: Making scripts python-scripts Jp Calderone Python 0 07-21-2005 02:38 PM
Wireless Login Scripts =?Utf-8?B?Smlt?= Wireless Networking 1 04-26-2005 03:15 PM



Advertisments