DosTips.com

A Forum all about DOS Batch
It is currently 21 Jul 2017 20:50

All times are UTC-06:00




Post new topic  Reply to topic  [ 2 posts ] 
Author Message
PostPosted: 31 Jan 2017 05:15 
Offline

Joined: 31 Jan 2017 04:53
Posts: 1
Hello,
Lets asume I have one folder that keeps logs from last 31 days
I need to create a batch file for archiving daily logs (log files like "day01.log", "Day02.log", ..."Day31.log", "End01.log", "End02.log", ..."End31.log", "Start01.log", "Start02.log", ..."Start31.log"
I don't need to archive daily, but sometimes I need to archive logs from day 07 up to day 11, or from 25 to 26.
I want to pass a file parameter name to a batch file. In this parameter file I want to include something like *10.log, *11.log, *12.log for extracting and archiving all logs from days 10 to 12 of the month.
In my situation, the batch file should remain unchanged, the parameter file name should remain unchanged, only the parameter file content.

Thank you,


Top
   
PostPosted: 19 Feb 2017 16:34 
Offline

Joined: 16 Jul 2013 12:00
Posts: 322
Location: HSV
All batch files have implicit variables starting with %1. Variables are after the batch name on the command line.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 2 posts ] 

All times are UTC-06:00


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited