Link to home
Start Free TrialLog in
Avatar of AmitTank
AmitTankFlag for United States of America

asked on

Move and rename log files

Hi,

I wonder if somebody has a powershell/vb/batch script to move files which are older than 4 hours (create time) to different location and rename those with adding create date & time at end.

Example: c:\*.log move it to d:\LogDir\*.log directory and rename those to *-mm-dd-yy-hh-mm.log

Assistance would be appreciated.
ASKER CERTIFIED SOLUTION
Avatar of BSonPosh
BSonPosh
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of AmitTank

ASKER

Thanks...
thanks for the A.
Thanks for sharing the script... :)