Computing.Net > Forums > Programming > Copy logs from previous month

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Copy logs from previous month

Reply to Message Icon

Name: alytech
Date: April 2, 2009 at 21:42:16 Pacific
OS: XP
CPU/Ram: 1 GB
Subcategory: Batch
Comment:

I need to create a batch file that allows me to copy logs created in the past month from a server to a workstation



Sponsored Link
Ads by Google

Response Number 1
Name: Mechanix2Go
Date: April 2, 2009 at 22:19:58 Pacific
Reply:

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.

M2


0
Reply to Message Icon

Related Posts

See More







Post Locked

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


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Copy logs from previous month

Rename and Copy Logs Recursively www.computing.net/answers/programming/rename-and-copy-logs-recursively/19855.html

Copy files from mult. subfolders www.computing.net/answers/programming/copy-files-from-mult-subfolders/13105.html

Copy files from cd with .bat file www.computing.net/answers/programming/copy-files-from-cd-with-bat-file/16112.html