Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I need to create a batch file that allows me to copy logs created in the past month from a server to a workstation

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 EnableDelayedExpansionfor /f "tokens=* delims=" %%a in ('dir/b/a-d') do (
echo %%~Ta
)
=====================================
If at first you don't succeed, you're about average.M2

![]() |
Batch to Check Date
|
Excel invoice
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |