Finding a monthly file in subfolders

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
dssrun
Posts: 4
Joined: 15 Nov 2010 14:18

Finding a monthly file in subfolders

#1 Post by dssrun » 15 Nov 2010 18:38

I have a system that spits out reports every month in a folder called Sample. In this sample folder are subfolders with the previous month name. Every month I need a report called Reports.000 in that months subfolder (last month would be 100110). I do not want to change my batch command every month to direct it to that months folder (e.g. G:\Sample\100110\Report.000 then change it to G:\Sample\110110\Report.000 etc...). I am guessing I need something to search in the subfolders of the Sample folder for the newest file of Report.000 . Once this file is found (possibly in a variable I create to make it easier) I perform a specific set of commands I have already outlined

brethallweg
Posts: 2
Joined: 22 Nov 2010 00:55

Re: Finding a monthly file in subfolders

#2 Post by brethallweg » 22 Nov 2010 01:11

i guess this can be solved by another dir function. i just dont know what.



_______________________
Blendtec

Post Reply