You are not logged in.

#1 18 Jul 2007 15:22

ruban
Member
Registered: 18 Jul 2007
Posts: 2

Check modified date on file and then run other bat fil ?

Hi !!

new at this forum but hope that someone can help me.

I need to check the modified date on a file with a script. If the file is older then 5 day i need to start other bat file to correct this.

I have found this topic http://ss64.org/viewtopic.php?id=222 but i don´t have the knowledge to make all changes so it help me.

Can someone please help me ???

Fredrik from Sweden

Offline

#2 18 Jul 2007 18:10

daat99
Member
From: Israel
Registered: 29 Jan 2007
Posts: 18
Website

Re: Check modified date on file and then run other bat fil ?

ruban wrote:

Hi !!

new at this forum but hope that someone can help me.

I need to check the modified date on a file with a script. If the file is older then 5 day i need to start other bat file to correct this.

I have found this topic http://ss64.org/viewtopic.php?id=222 but i don´t have the knowledge to make all changes so it help me.

Can someone please help me ???

Fredrik from Sweden

I wasn't able to deal with this issue since the last post there but the robocopy solution seems the easier 1 to implement.
I would suggest checking into it a bit more.


I always try to help wink
Sometimes I don't know how sad

Offline

#3 18 Jul 2007 18:13

Simon Sheppard
Admin
Registered: 27 Aug 2005
Posts: 1,130
Website

Re: Check modified date on file and then run other bat fil ?

If you want to modify the DELOLDER script to do something other than delete just edit the last line

i.e. change [ECHO DELETE the file] to  [START MYBAT.cmd] or whatever

if you then save the new script as FIXOLDER.cmd you can run

fixolder 5 "C:\Log Files\*.LOG"

this will run MYBAT against all the log files older than 5 days

Offline

Board footer

Powered by