Copy logs from previous month

April 2, 2009 at 21:42:16
Specs: XP, 1 GB
I need to create a batch file that allows me to copy logs created in the past month from a server to a workstation

See More: Copy logs from previous month

Report •

April 2, 2009 at 22:19:58
If it's strictly 'the previous month' that's one thing. If it's to be 'more than 30 days old' that's another story.

Either way, a first step is to run the script below and post a few lines to show the date layout.

@echo off & setLocal EnableDelayedExpansion

for /f "tokens=* delims=" %%a in ('dir/b/a-d') do (
echo %%~Ta

If at first you don't succeed, you're about average.


Report •
Related Solutions

Ask Question