parameter file sent to a batch file

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
titicarata
Posts: 1
Joined: 31 Jan 2017 04:53

parameter file sent to a batch file

#1 Post by titicarata » 31 Jan 2017 05:15

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,

Samir
Posts: 384
Joined: 16 Jul 2013 12:00
Location: HSV
Contact:

Re: parameter file sent to a batch file

#2 Post by Samir » 19 Feb 2017 16:34

All batch files have implicit variables starting with %1. Variables are after the batch name on the command line.

Post Reply